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.
This commit is contained in:
@@ -171,21 +171,6 @@ _threadsetproc(Proc *p)
|
|||||||
void
|
void
|
||||||
_pthreadinit(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);
|
pthread_key_create(&prockey, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user