🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: pl.comp.os.freebsd
1 messages
1 total messages Started by vertigo Sun, 23 May 2004 13:24
watki pthread we freebsd5.1 ?
#57841
Author: vertigo
Date: Sun, 23 May 2004 13:24
30 lines
1616 bytes
Czesc
Mial ktos moze problemy z watkami pthread we freebsd5.1p16 ?
U mnie przy tworzeniu drugiego watku zawsze sypie seg.faultami,
nawet najprostszy program:
#include <pthread.h>
#include <stdio.h>

void* test(void* s)
{
     return NULL;
}

int main (void)
{
     pthread_t t1,t2;
     pthread_create(&t1,NULL,&test,NULL);
     pthread_create(&t2,NULL,&test,NULL);
     pthread_join(t1,NULL);
     pthread_join(t2,NULL);
     return 0;
}

i po wykananiu dostaje segmentation fault. Jak wykomnetuje jedno
pthread_create() wszytsko (nawet w o wiele bardziej skomplikowanym 
przypadku) dziala.
Dlaczego ?

Dzieki
Michal
P.S Jak inaczej latwo i szybko stworzyc watek ? (tylko nie przez pth).
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads