ntdll: Fetch thread id on NetBSD.
This commit is contained in:
parent
fa4e97f454
commit
83bac4113c
|
@ -5857,6 +5857,7 @@ for ac_header in \
|
||||||
linux/serial.h \
|
linux/serial.h \
|
||||||
linux/types.h \
|
linux/types.h \
|
||||||
linux/ucdrom.h \
|
linux/ucdrom.h \
|
||||||
|
lwp.h \
|
||||||
mach-o/nlist.h \
|
mach-o/nlist.h \
|
||||||
mach-o/loader.h \
|
mach-o/loader.h \
|
||||||
mach/mach.h \
|
mach/mach.h \
|
||||||
|
|
|
@ -452,6 +452,7 @@ AC_CHECK_HEADERS(\
|
||||||
linux/serial.h \
|
linux/serial.h \
|
||||||
linux/types.h \
|
linux/types.h \
|
||||||
linux/ucdrom.h \
|
linux/ucdrom.h \
|
||||||
|
lwp.h \
|
||||||
mach-o/nlist.h \
|
mach-o/nlist.h \
|
||||||
mach-o/loader.h \
|
mach-o/loader.h \
|
||||||
mach/mach.h \
|
mach/mach.h \
|
||||||
|
|
|
@ -28,6 +28,9 @@
|
||||||
#endif
|
#endif
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#ifdef HAVE_LWP_H
|
||||||
|
#include <lwp.h>
|
||||||
|
#endif
|
||||||
#ifdef HAVE_PTHREAD_NP_H
|
#ifdef HAVE_PTHREAD_NP_H
|
||||||
# include <pthread_np.h>
|
# include <pthread_np.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -956,6 +959,8 @@ static int get_unix_tid(void)
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
ret = mach_thread_self();
|
ret = mach_thread_self();
|
||||||
mach_port_deallocate(mach_task_self(), ret);
|
mach_port_deallocate(mach_task_self(), ret);
|
||||||
|
#elif defined(__NetBSD__)
|
||||||
|
ret = _lwp_self();
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__)
|
||||||
long lwpid;
|
long lwpid;
|
||||||
thr_self( &lwpid );
|
thr_self( &lwpid );
|
||||||
|
|
|
@ -440,6 +440,9 @@
|
||||||
/* Define to 1 if you have the `lstat' function. */
|
/* Define to 1 if you have the `lstat' function. */
|
||||||
#undef HAVE_LSTAT
|
#undef HAVE_LSTAT
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <lwp.h> header file. */
|
||||||
|
#undef HAVE_LWP_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <machine/cpu.h> header file. */
|
/* Define to 1 if you have the <machine/cpu.h> header file. */
|
||||||
#undef HAVE_MACHINE_CPU_H
|
#undef HAVE_MACHINE_CPU_H
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue