diff mbox

[1/2] linux-user: Add target struct defs needed for POSIX timer syscalls.

Message ID 1382100952-2269-1-git-send-email-mle+hs@mega-nerd.com
State New
Headers show

Commit Message

mle+hs@mega-nerd.com Oct. 18, 2013, 12:55 p.m. UTC
From: Erik de Castro Lopo <erikd@mega-nerd.com>

---
 linux-user/syscall_defs.h | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 5f53a28..ca683d1 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -168,6 +168,11 @@  struct target_itimerval {
     struct target_timeval it_value;
 };
 
+struct target_itimerspec {
+    struct target_timespec it_interval;
+    struct target_timespec it_value;
+};
+
 typedef abi_long target_clock_t;
 
 #define TARGET_HZ 100
@@ -1819,7 +1824,7 @@  struct target_stat {
     	abi_long	st_blocks;	/* Number 512-byte blocks allocated. */
 
 	abi_ulong	target_st_atime;
-	abi_ulong 	target_st_atime_nsec; 
+	abi_ulong 	target_st_atime_nsec;
 	abi_ulong	target_st_mtime;
 	abi_ulong	target_st_mtime_nsec;
 	abi_ulong	target_st_ctime;
@@ -2513,3 +2518,26 @@  struct target_ucred {
 };
 
 #endif
+
+
+#define SIGEV_PAD_SIZE (sizeof(((struct sigevent *)0)->_sigev_un._pad) \
+                        / sizeof(((struct sigevent *)0)->_sigev_un._pad[0]))
+
+struct target_timer_t {
+    abi_ulong ptr;
+};
+
+struct target_sigevent {
+    target_sigval_t sigev_value;
+    int32_t sigev_signo;
+    int32_t sigev_notify;
+    union {
+        int32_t _pad[SIGEV_PAD_SIZE];
+        int32_t _tid;
+
+        struct {
+            void (*_function)(sigval_t);
+            void *_attribute;
+        } _sigev_thread;
+    } _sigev_un;
+};