MFlibthr:
In _pthread_key_create() ensure that libkse is initialized.
This commit is contained in:
parent
9538bab38b
commit
4940ef4ad0
@ -90,9 +90,13 @@ _pthread_key_create(pthread_key_t *key, void (*destructor) (void *))
|
||||
int
|
||||
_pthread_key_delete(pthread_key_t key)
|
||||
{
|
||||
struct pthread *curthread = _get_curthread();
|
||||
struct pthread *curthread;
|
||||
int ret = 0;
|
||||
|
||||
if (_thr_initial == NULL)
|
||||
_libpthread_init(NULL);
|
||||
curthread = _get_curthread();
|
||||
|
||||
if ((unsigned int)key < PTHREAD_KEYS_MAX) {
|
||||
/* Lock the key table: */
|
||||
THR_LOCK_ACQUIRE(curthread, &_keytable_lock);
|
||||
|
Loading…
Reference in New Issue
Block a user