Split headers up to reduce namespace pollution
authorAndrew Waterman <waterman@parcad.millennium.berkeley.edu>
Wed, 27 Jan 2010 21:49:55 +0000 (13:49 -0800)
committerAndrew Waterman <waterman@parcad.millennium.berkeley.edu>
Wed, 27 Jan 2010 21:49:55 +0000 (13:49 -0800)
kern/include/env.h
kern/include/ros/ring_buffer.h
kern/include/ros/ring_syscall.h [new file with mode: 0644]
kern/include/ros/syscall.h

index 4ceaba1..49f67b1 100644 (file)
@@ -14,6 +14,7 @@
 #include <ros/common.h>
 #include <arch/arch.h>
 #include <sys/queue.h>
+#include <atomic.h>
 
 struct Env;
 typedef struct Env env_t;
index 3fac1ec..0f8c203 100644 (file)
@@ -28,7 +28,7 @@
 #define ROS_INC_RING_BUFFER_H
 
 #include <string.h>
-#include <arch/atomic.h>
+#include <arch/membar.h>
 
 #define xen_mb()  mb()
 #define xen_rmb() rmb()
diff --git a/kern/include/ros/ring_syscall.h b/kern/include/ros/ring_syscall.h
new file mode 100644 (file)
index 0000000..9f8be05
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef _ROS_RING_SYSCALL_H
+#define _ROS_RING_SYSCALL_H
+
+#include <ros/common.h>
+#include <ros/ring_buffer.h>
+#include <ros/sysevent.h>
+
+#define NUM_SYSCALL_ARGS 6
+typedef struct syscall_req {
+        uint32_t num;
+        uint32_t flags;
+        uint32_t args[NUM_SYSCALL_ARGS];
+} syscall_req_t;
+
+typedef struct syscall_rsp {
+        int32_t retval;
+} syscall_rsp_t;
+
+// Generic Syscall Ring Buffer
+#define SYSCALLRINGSIZE    PGSIZE
+//DEFINE_RING_TYPES_WITH_SIZE(syscall, syscall_req_t, syscall_rsp_t,
+//SYSCALLRINGSIZE);
+DEFINE_RING_TYPES(syscall, syscall_req_t, syscall_rsp_t);
+
+#endif
index 93eb378..220a087 100644 (file)
 #define SYS_eth_write                          26
 #define SYS_frontend                           27
 
+#define SYS_read                               100
+#define SYS_write                              101
+#define SYS_open                               102
+#define SYS_close                              103
+#define SYS_fstat                              104
+#define SYS_stat                               105
+#define SYS_lstat                              106
+#define SYS_fcntl                              107
+#define SYS_access                             108
+#define SYS_umask                              109
+#define SYS_chmod                              110
+#define SYS_lseek                              111
+#define SYS_link                               112
+#define SYS_unlink                             113
+#define SYS_chdir                              114
+#define SYS_getcwd                             115
+#define SYS_gettimeofday                       116
+
 /* For Buster Measurement Flags */
 #define BUSTER_SHARED                  0x0001
 #define BUSTER_STRIDED                 0x0002
 #define BUSTER_PRINT_TICKS             0x0008
 #define BUSTER_JUST_LOCKS              0x0010 // unimplemented
 
-#ifndef __ASSEMBLER__
-
-#include <ros/common.h>
-#include <ros/ring_buffer.h>
-
-#define NUM_SYSCALL_ARGS 6
-typedef struct syscall_req {
-       uint32_t num;
-       uint32_t flags;
-       uint32_t args[NUM_SYSCALL_ARGS];
-} syscall_req_t;
-
-typedef struct syscall_rsp {
-       int32_t retval;
-} syscall_rsp_t;
-
-// Generic Syscall Ring Buffer
-#define SYSCALLRINGSIZE    PGSIZE
-//DEFINE_RING_TYPES_WITH_SIZE(syscall, syscall_req_t, syscall_rsp_t, SYSCALLRINGSIZE);
-DEFINE_RING_TYPES(syscall, syscall_req_t, syscall_rsp_t);
-
-#endif /* __ASSEMBLER__ */
 #endif /* !ROS_INCLUDE_SYSCALL_H */