Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 65884 Details for
Bug 102442
Executables using glibc-2.3.5-r1 + NPTL (with TLS) hang
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Test c code using pthreads and TLS
thread.test.c (text/plain), 515 bytes, created by
darkgrave
on 2005-08-13 16:45:06 UTC
(
hide
)
Description:
Test c code using pthreads and TLS
Filename:
MIME Type:
Creator:
darkgrave
Created:
2005-08-13 16:45:06 UTC
Size:
515 bytes
patch
obsolete
>#include <pthread.h> >#include <stdlib.h> >#include <unistd.h> >#include <stdio.h> > >void *thread_function(void *arg) { > static __thread int i; > for ( i=0; i<20; i++ ) { > printf("Thread says hi!\n"); > sleep(1); > } > return NULL; >} > >int main(void) { > > pthread_t mythread; > > if ( pthread_create( &mythread, NULL, thread_function, NULL) ) { > printf("error creating thread."); > abort(); > } > > if ( pthread_join ( mythread, NULL ) ) { > printf("error joining thread."); > abort(); > } > > exit(0); > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 102442
: 65884