diff options
| author | Dan Cross <cross@gajendra.net> | 2025-07-25 13:06:53 -0400 |
|---|---|---|
| committer | Dan Cross <cross@gajendra.net> | 2025-07-25 13:06:53 -0400 |
| commit | 0bc66bfb3dda9b1d7d1db266a9046705bda1cd15 (patch) | |
| tree | fe62eea72c388bd596cbc6843ed0c5589ac9f745 /src | |
| parent | 156e745be9f6a1b19b0f8e2a931148786d7acad4 (diff) | |
libthread: remove check for LinuxThreads
libthread had code in `_pthreadinit` to test for LinuxThreads,
and error if it was in use. This hasn't been relevant since
Linux 2.6, and I can't imagine there are many people trying to
build (recent) plan9port on systems that old.
Unfortunately, this code violated aliasing rules, and compilers
were complaining about it. But, since it likely hasn't had much
relevance in 20ish years, we can probably just remove it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/libthread/pthread.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/libthread/pthread.c b/src/libthread/pthread.c index 35f6ffe3..c2cc92ed 100644 --- a/src/libthread/pthread.c +++ b/src/libthread/pthread.c @@ -171,21 +171,6 @@ _threadsetproc(Proc *p) void _pthreadinit(void) { - static struct utsname un; - pthread_t id; - - if(uname(&un) < 0) - fprint(2, "warning: uname failed: %r\n"); - if(strcmp(un.sysname, "Linux") == 0){ - /* - * Want to distinguish between the old LinuxThreads pthreads - * and the new NPTL implementation. NPTL uses much bigger - * thread IDs. - */ - id = pthread_self(); - if(*(ulong*)(void*)&id < 1024*1024) - sysfatal("cannot use LinuxThreads as pthread library; see %s/src/libthread/README.Linux", get9root()); - } pthread_key_create(&prockey, 0); } |