Sourceware Bugzilla – Attachment 6870 Details for
Bug 15142
Missing locking in _IO_cleanup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Testcase
stdio-thread.c (text/x-csrc), 1.09 KB, created by
Andreas Schwab
on 2013-02-13 13:12:21 UTC
(
hide
)
Description:
Testcase
Filename:
MIME Type:
Creator:
Andreas Schwab
Created:
2013-02-13 13:12:21 UTC
Size:
1.09 KB
patch
obsolete
>#include <stdio.h> >#include <stdlib.h> >#include <unistd.h> >#include <string.h> >#include <pthread.h> > >void >cm_my_log (void) >{ > FILE *pLog_file; > > pLog_file = fopen ("./log", "a+"); > if (pLog_file == NULL) > return; > > fwrite ("abcdefg\n", 1, 8, pLog_file); > fflush (pLog_file); > fclose (pLog_file); >} > >void * >write_cm_log (void *arg) >{ > while (1) > cm_my_log (); >} > >int >main (void) >{ > > pthread_t tid1; > pthread_t tid2; > pthread_t tid3; > pthread_t tid4; > pthread_t tid5; > pthread_t tid6; > pthread_t tid7; > pthread_t tid8; > pthread_t tid9; > pthread_t tid10; > > pthread_create (&tid1, NULL, write_cm_log, NULL); > pthread_create (&tid2, NULL, write_cm_log, NULL); > pthread_create (&tid3, NULL, write_cm_log, NULL); > pthread_create (&tid4, NULL, write_cm_log, NULL); > pthread_create (&tid5, NULL, write_cm_log, NULL); > pthread_create (&tid6, NULL, write_cm_log, NULL); > pthread_create (&tid7, NULL, write_cm_log, NULL); > pthread_create (&tid8, NULL, write_cm_log, NULL); > pthread_create (&tid9, NULL, write_cm_log, NULL); > pthread_create (&tid10, NULL, write_cm_log, NULL); > > sleep (1); >}
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 15142
: 6870