mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
add implementation of sys_sem_cancelablewait
- add nicer debug messages - add current version of our pthread_library
This commit is contained in:
parent
4656fa8162
commit
ba28643e3e
3 changed files with 9 additions and 4 deletions
|
@ -359,7 +359,10 @@ int sys_sem_timedwait(sem_t *sem, unsigned int ms)
|
|||
|
||||
int sys_sem_cancelablewait(sem_t* sem, unsigned int ms)
|
||||
{
|
||||
return -ENOSYS;
|
||||
if (BUILTIN_EXPECT(!sem, 0))
|
||||
return -EINVAL;
|
||||
|
||||
return sem_wait(sem, ms);
|
||||
}
|
||||
|
||||
int sys_clone(tid_t* id, void* ep, void* argv)
|
||||
|
|
|
@ -315,8 +315,6 @@ int clone_task(tid_t* id, entry_point_t ep, void* arg, uint8_t prio)
|
|||
if ((core_id >= MAX_CORES) || !readyqueues[core_id].idle)
|
||||
core_id = CORE_ID;
|
||||
|
||||
kprintf("start new thread on core %d with stack address %p\n", core_id, stack);
|
||||
|
||||
for(i=0; i<MAX_TASKS; i++) {
|
||||
if (task_table[i].status == TASK_INVALID) {
|
||||
task_table[i].id = i;
|
||||
|
@ -362,6 +360,10 @@ int clone_task(tid_t* id, entry_point_t ep, void* arg, uint8_t prio)
|
|||
}
|
||||
|
||||
spinlock_irqsave_unlock(&table_lock);
|
||||
|
||||
if (!ret)
|
||||
kprintf("start new thread %d on core %d with stack address %p\n", i, core_id, stack);
|
||||
|
||||
out:
|
||||
if (ret)
|
||||
kfree(stack);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 1cc811b60d8cb7362cffda973b95e450b24341f5
|
||||
Subproject commit 9dbfa59e382fd99164b2d80d620dab5decced3d0
|
Loading…
Add table
Reference in a new issue