forked from xuos/xiuos
minor: fix some bugs
This commit is contained in:
parent
458a7c5d91
commit
b0e6e4fe49
|
@ -33,7 +33,7 @@ int pthread_create(pthread_t *thread, const pthread_attr_t *attr,
|
|||
|
||||
if (NULL == attr) {
|
||||
task.prio = KTASK_PRIORITY_MAX / 2;
|
||||
task.stack_size = 1024 ;
|
||||
task.stack_size = 4096 ;
|
||||
} else {
|
||||
task.prio = attr->schedparam.sched_priority ;
|
||||
task.stack_size = attr->stacksize ;
|
||||
|
|
|
@ -114,7 +114,7 @@ static int32 _MutexObtain(struct Mutex *mutex, int32 msec)
|
|||
KTaskPrioSet(mutex->holder->id.id, task->task_dync_sched_member.cur_prio);
|
||||
}
|
||||
|
||||
LinklistSuspend(&(mutex->pend_list), task, LINKLIST_FLAG_PRIO);
|
||||
LinklistSuspend(&(mutex->pend_list), task, LINKLIST_FLAG_FIFO);
|
||||
|
||||
if (wait_time > 0) {
|
||||
SYS_KDEBUG_LOG(KDBG_IPC,
|
||||
|
|
|
@ -120,7 +120,7 @@ static int32 _SemaphoreObtain(struct Semaphore *sem, int32 msec)
|
|||
SYS_KDEBUG_LOG(KDBG_IPC, ("obtain semaphore: suspending task %s\n",
|
||||
GetKTaskDescriptor()->task_base_info.name));
|
||||
|
||||
LinklistSuspend(&sem->pend_list, task, LINKLIST_FLAG_PRIO);
|
||||
LinklistSuspend(&sem->pend_list, task, LINKLIST_FLAG_FIFO);
|
||||
|
||||
if (wait_time > 0) {
|
||||
KTaskSetDelay(task, wait_time);
|
||||
|
|
Loading…
Reference in New Issue