Removes EBADPROC
[akaros.git] / kern / include / ros / syscall.h
1 #ifndef ROS_INC_SYSCALL_H
2 #define ROS_INC_SYSCALL_H
3
4 #include <arch/arch.h>
5 #include <ros/bits/syscall.h>
6 #include <ros/arch/syscall.h>
7 #include <ros/event.h>
8 #include <ros/atomic.h>
9
10 /* Flags for an individual syscall.
11  * Careful, sparc can't handle flags in byte 3. */
12 #define SC_DONE                                 0x0001          /* SC is done */
13 #define SC_PROGRESS                             0x0002          /* SC made progress */
14 #define SC_UEVENT                               0x0004          /* user has an ev_q */
15 #define SC_K_LOCK                               0x0008          /* kernel locked sysc */
16
17 struct syscall {
18         unsigned int                            num;
19         int                                                     err;                    /* errno */
20         long                                            retval;
21         atomic_t                                        flags;
22         struct event_queue                      *ev_q;
23         void                                            *u_data;
24         long                                            arg0;
25         long                                            arg1;
26         long                                            arg2;
27         long                                            arg3;
28         long                                            arg4;
29         long                                            arg5;
30 };
31
32 #ifndef ROS_KERNEL
33
34 /* Temp hack, til the rest of glibc/userspace uses sys/syscall.h */
35 #include <sys/syscall.h>
36
37 #endif /* ifndef ROS_KERNEL */
38
39 #endif /* ROS_INC_SYSCALL_H */