popl %ebx
ret
-/* int cxsend(pid_t dst, struct ipc_msg *buf) */
-
-.global cxsend
-cxsend:
- pushl %ebx
-
- movl $IPC_SEND, %eax
- movl 8(%esp), %ebx
- movl 12(%esp), %ecx
- int $SYSCALL_CXIPC
-
- popl %ebx
- ret
-
-/* int cxrecv(pid_t src, struct ipc_msg *buf) */
-.global cxrecv
-cxrecv:
- pushl %ebx
-
- movl $IPC_RECV, %eax
- movl 8(%esp), %ebx
- movl 12(%esp), %ecx
- int $SYSCALL_CXIPC
-
- popl %ebx
- ret
-
-.global cxsendrecv
-cxsendrecv:
- pushl %ebx
-
- movl $IPC_SENDRECV, %eax
- movl 8(%esp), %ebx
- movl 12(%esp), %ecx
- int $SYSCALL_CXIPC
-
- popl %ebx
- ret
-
.global sleep
sleep:
pushl %ebx
OUTPUT = klibc.a
-OBJECTS = string.o spinlock.o mutex.o posixcall.o
+OBJECTS = string.o spinlock.o mutex.o posixcall.o coraxcall.o
PHONY = clean
INCLUDES = -I../include -I../../include -I../..
CFLAGS = -m32 -Wall -nostdlib -nodefaultlibs -nostartfiles -ffreestanding $(INCLUDES)
--- /dev/null
+#define __ASSEMBLY_SOURCE
+
+#include <config.h>
+#include <corax/syscall.h>
+
+ .section .text
+
+ .global cxsend
+ .global cxrecv
+ .global cxsendrecv
+
+cxsend:
+ pushl %ebx
+
+ movl $IPC_SEND, %eax
+ movl 8(%esp), %ebx
+ movl 12(%esp), %ecx
+ int $SYSCALL_CXIPC
+
+ popl %ebx
+ ret
+
+cxrecv:
+ pushl %ebx
+
+ movl $IPC_RECV, %eax
+ movl 8(%esp), %ebx
+ movl 12(%esp), %ecx
+ int $SYSCALL_CXIPC
+
+ popl %ebx
+ ret
+
+cxsendrecv:
+ pushl %ebx
+
+ movl $IPC_SENDRECV, %eax
+ movl 8(%esp), %ebx
+ movl 12(%esp), %ecx
+ int $SYSCALL_CXIPC
+
+ popl %ebx
+ ret