linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* threads
@ 2005-11-06  6:17 Fabio Andres Miranda
  2005-11-06  8:41 ` threads Steve Graegert
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio Andres Miranda @ 2005-11-06  6:17 UTC (permalink / raw)
  To: linux-c-programming

Why these threads are not executed:


main(){
    pthread threads_array[25];
    pthread_attr_init(&attr);
    for (i=0;i<25;i++)
        if ( pthread_create(threads_array[i],&attr,pthread_routine,(void 
*)i) ){
            perror("pthread_create");
        }
    while(1);
}


void
pthread_routine(void *arg){
    printf("hello world\n");
}

$./a.out
$

I read somethg about the initial state is suspended, smthg like that, 
how to execute the thread as created then?

Thanks

fabiolini

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-11-06  8:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-06  6:17 threads Fabio Andres Miranda
2005-11-06  8:41 ` threads Steve Graegert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).