mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-11 20:01:48 +00:00
committed by
Christian Helmuth
parent
002eb6f649
commit
ebea6fb23f
@ -25,6 +25,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <semaphore.h>
|
#include <semaphore.h>
|
||||||
|
#include <stdio.h> /* __isthreaded */
|
||||||
#include <stdlib.h> /* malloc, free */
|
#include <stdlib.h> /* malloc, free */
|
||||||
|
|
||||||
/* libc-internal includes */
|
/* libc-internal includes */
|
||||||
@ -74,6 +75,9 @@ size_t Pthread::_tls_pointer_offset;
|
|||||||
|
|
||||||
void Libc::Pthread::Thread_object::entry()
|
void Libc::Pthread::Thread_object::entry()
|
||||||
{
|
{
|
||||||
|
/* use threaded mode in FreeBSD libc code */
|
||||||
|
__isthreaded = 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Obtain stack attributes of new thread for
|
* Obtain stack attributes of new thread for
|
||||||
* 'pthread_attr_get_np()'
|
* 'pthread_attr_get_np()'
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
/* libc includes */
|
/* libc includes */
|
||||||
#include <libc/allocator.h>
|
#include <libc/allocator.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <stdio.h> /* __isthreaded */
|
||||||
|
|
||||||
/* libc-internal includes */
|
/* libc-internal includes */
|
||||||
#include <internal/init.h>
|
#include <internal/init.h>
|
||||||
@ -172,6 +173,10 @@ int Libc::pthread_create_from_thread(pthread_t *thread, Thread &t, void *stack_a
|
|||||||
return EAGAIN;
|
return EAGAIN;
|
||||||
|
|
||||||
*thread = thread_obj;
|
*thread = thread_obj;
|
||||||
|
|
||||||
|
/* use threaded mode in FreeBSD libc code */
|
||||||
|
__isthreaded = 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user