Skip to contentSkip to conversation

Native: Add fixed syscalls for rt_cond_wait services

RFC New Jan Kiszka 1 participant 1 message Mar 4, 2010

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

RFC 1/1 Native: Add fixed syscalls for rt_cond_wait services

This is specifically RFC as I don't know what your plan regarding replace or add is. This version adds new calls for new libnatives, of course it would be much simpler if if only had to replace the existing ones.

Jan

---
 include/native/cond.h       |    8 +++
 include/native/syscall.h    |    2 +
 ksrc/skins/native/syscall.c |  101 ++++++++++++++++++++++++++++++++++---------
 src/skins/native/cond.c     |   82 ++++++++++++++++++++++++-----------
 src/skins/native/init.c     |    4 ++
 5 files changed, 151 insertions(+), 46 deletions(-)
include/native/cond.h +8 -0
index 1d38b2c..bca7a63 100644
@@ -38,6 +38,14 @@ typedef struct rt_cond_placeholder {
 
 } RT_COND_PLACEHOLDER;
 
+typedef struct rt_cond_waitstate {
+
+    unsigned lockcnt;
+
+    int prologue_err;
+
+} RT_COND_WAITSTATE;
+
 #if (defined(__KERNEL__) || defined(__XENO_SIM__)) && !defined(DOXYGEN_CPP)
 
 #include <nucleus/synch.h>
include/native/syscall.h +2 -0
index 2e3d7ec..59f0ce4 100644
@@ -128,6 +128,8 @@
 #define __native_buffer_inquire     102
 #define __native_queue_flush        103
 #define __native_cond_wait_epilogue 104
+#define __native_cond_wait_prologue2 105
+#define __native_cond_wait_epilogue2 106
 
 struct rt_arg_bulk {
 
ksrc/skins/native/syscall.c +80 -21

159 lines not on this page · raw message

src/skins/native/cond.c +57 -25

125 lines not on this page · raw message

src/skins/native/init.c +4 -0
index e85784a..c4b94c0 100644
@@ -28,6 +28,8 @@
 
 int __native_muxid = -1;
 
+void __native_cond_init(void);
+
 #ifndef HAVE___THREAD
 pthread_key_t __native_tskey;
 
@@ -56,4 +58,6 @@ void __init_xeno_interface(void)
 		xeno_bind_skin(XENO_SKIN_MAGIC, "native", "xeno_native", NULL);
 
 	__native_muxid = __xn_mux_shifted_id(__native_muxid);
+
+	__native_cond_init();
 }
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux