Ignore:
Timestamp:
Oct 21, 2008, 4:55:00 AM (12 years ago)
Author:
gb
Message:

#include <sys/syscall.h> on Linux. use gettid() (which is only
available via syscall) for get_current_native_thread_id() on Linux.
(These thread IDs are what're used by GDB's 'info threads' command;
they're pid's from the linux kernel's perspective, but threads within
a process all see the same value returned by getpid() in modern Linux.)
Fall back to getpid() if the syscall isn't defined, but I'm not sure
that we can run on something so old that the syscall wouldn't be defined.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/thread_manager.c

    r11170 r11184  
    13241324  return ((void *) (natural)
    13251325#ifdef LINUX
     1326#ifdef __NR_gettid
     1327          syscall(__NR_gettid)
     1328#else
    13261329          getpid()
     1330#endif
    13271331#endif
    13281332#ifdef DARWIN
Note: See TracChangeset for help on using the changeset viewer.