Skip to content
Snippets Groups Projects
Commit 7bdf8200 authored by deuce's avatar deuce
Browse files

DigitalMan: missing some curly braces there aren't ya?

parent a751a118
No related branches found
No related tags found
No related merge requests found
...@@ -63,6 +63,7 @@ ulong _beginthread(void( *start_address )( void * ) ...@@ -63,6 +63,7 @@ ulong _beginthread(void( *start_address )( void * )
size_t default_stack; size_t default_stack;
pthread_attr_init(&attr); /* initialize attribute structure */ pthread_attr_init(&attr); /* initialize attribute structure */
/* set thread attributes to PTHREAD_CREATE_DETACHED which will ensure /* set thread attributes to PTHREAD_CREATE_DETACHED which will ensure
that thread resources are freed on exit() */ that thread resources are freed on exit() */
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
...@@ -79,15 +80,16 @@ ulong _beginthread(void( *start_address )( void * ) ...@@ -79,15 +80,16 @@ ulong _beginthread(void( *start_address )( void * )
if(pthread_create(&thread if(pthread_create(&thread
#if defined(__BORLANDC__) /* a (hopefully temporary) work-around */ #if defined(__BORLANDC__) /* a (hopefully temporary) work-around */
,NULL ,NULL
#else #else
,&attr /* default attributes */ ,&attr /* default attributes */
#endif #endif
/* POSIX defines this arg as "void *(*start_address)" */ /* POSIX defines this arg as "void *(*start_address)" */
,(void * (*)(void *)) start_address ,(void * (*)(void *)) start_address
,arglist)==0) ,arglist)==0) {
pthread_attr_destroy(&attr); pthread_attr_destroy(&attr);
return((int) thread /* thread handle */); return((int) thread /* thread handle */);
}
pthread_attr_destroy(&attr); pthread_attr_destroy(&attr);
return(-1); /* error */ return(-1); /* error */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment