Add an errstr to the syscall struct
[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 #define SC_DONE                                 0x0001          /* SC is done */
12 #define SC_PROGRESS                             0x0002          /* SC made progress */
13 #define SC_UEVENT                               0x0004          /* user has an ev_q */
14 #define SC_K_LOCK                               0x0008          /* kernel locked sysc */
15
16 struct syscall {
17         unsigned int                            num;
18         int                                                     err;                    /* errno */
19         long                                            retval;
20         atomic_t                                        flags;
21         struct event_queue                      *ev_q;
22         void                                            *u_data;
23         long                                            arg0;
24         long                                            arg1;
25         long                                            arg2;
26         long                                            arg3;
27         long                                            arg4;
28         long                                            arg5;
29         char                                            errstr[32];
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 #endif /* ifndef ROS_KERNEL */
37
38 #endif /* ROS_INC_SYSCALL_H */