This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 13/22] Provide lwpid_t via <sys/types.h>


Provide lwpid_t via <sys/types.h> if __BSD_VISIBLE for BSD
compatibility.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
---
 newlib/libc/include/sys/_types.h | 1 +
 newlib/libc/include/sys/types.h  | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index d47d7e9..edb7fb1 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -200,6 +200,7 @@ typedef	__uint32_t	__socklen_t;
 
 typedef	int		__accmode_t;	/* access permissions */
 typedef	__uint32_t	__fixpt_t;	/* fixed point number */
+typedef	__pid_t		__lwpid_t;	/* Thread ID (a.k.a. LWP) */
 typedef	unsigned short	__nlink_t;
 typedef	long		__suseconds_t;	/* microseconds (signed) */
 typedef	unsigned long	__useconds_t;	/* microseconds (unsigned) */
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index d473ffc..a328c73 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -96,6 +96,11 @@ typedef	__uint32_t	in_addr_t;	/* base type for internet address */
 typedef	__uint16_t	in_port_t;
 #define	_IN_PORT_T_DECLARED
 #endif
+
+#ifndef _LWPID_T_DECLARED
+typedef	__lwpid_t	lwpid_t;	/* Thread ID (a.k.a. LWP) */
+#define	_LWPID_T_DECLARED
+#endif
 #endif /* __BSD_VISIBLE */
 
 #if __MISC_VISIBLE
-- 
1.8.4.5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]