mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-25 11:33:27 +08:00
Update due to API changes
This commit is contained in:
parent
92e9493726
commit
43a14eba2e
@ -1920,23 +1920,21 @@ force_select_timeout(Thread_Control *thread)
|
|||||||
rtems_status_code rtems_bsd_force_select_timeout(rtems_id task_id)
|
rtems_status_code rtems_bsd_force_select_timeout(rtems_id task_id)
|
||||||
{
|
{
|
||||||
Thread_Control *thread;
|
Thread_Control *thread;
|
||||||
Objects_Locations location;
|
ISR_lock_Context lock_context;
|
||||||
|
|
||||||
thread = _Thread_Get(task_id, &location);
|
thread = _Thread_Get(task_id, &lock_context);
|
||||||
switch (location) {
|
if (thread == NULL) {
|
||||||
case OBJECTS_LOCAL:
|
|
||||||
force_select_timeout(thread);
|
|
||||||
_Objects_Put(&thread->Object);
|
|
||||||
break;
|
|
||||||
#if defined(RTEMS_MULTIPROCESSING)
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
case OBJECTS_REMOTE:
|
if (_Thread_MP_Is_remote(id)) {
|
||||||
_Thread_Dispatch();
|
|
||||||
return (RTEMS_ILLEGAL_ON_REMOTE_OBJECT);
|
return (RTEMS_ILLEGAL_ON_REMOTE_OBJECT);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
default:
|
|
||||||
return (RTEMS_INVALID_ID);
|
return (RTEMS_INVALID_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_ISR_lock_ISR_enable(&lock_context);
|
||||||
|
force_select_timeout(thread);
|
||||||
return (RTEMS_SUCCESSFUL);
|
return (RTEMS_SUCCESSFUL);
|
||||||
}
|
}
|
||||||
#endif /* __rtems__ */
|
#endif /* __rtems__ */
|
||||||
|
@ -78,25 +78,14 @@ static Thread_Control *
|
|||||||
rtems_bsd_get_thread_by_id(rtems_id task_id)
|
rtems_bsd_get_thread_by_id(rtems_id task_id)
|
||||||
{
|
{
|
||||||
Thread_Control *thread;
|
Thread_Control *thread;
|
||||||
Objects_Locations location;
|
ISR_lock_Context lock_context;
|
||||||
|
|
||||||
thread = _Thread_Get(task_id, &location);
|
thread = _Thread_Get(task_id, &lock_context);
|
||||||
switch (location) {
|
if (thread != NULL) {
|
||||||
case OBJECTS_LOCAL:
|
_ISR_lock_ISR_enable(&lock_context);
|
||||||
_Objects_Put(&thread->Object);
|
|
||||||
break;
|
|
||||||
#if defined(RTEMS_MULTIPROCESSING)
|
|
||||||
case OBJECTS_REMOTE:
|
|
||||||
_Thread_Dispatch();
|
|
||||||
thread = NULL;
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
default:
|
|
||||||
thread = NULL;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return thread;
|
return (thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct thread *
|
struct thread *
|
||||||
|
Loading…
x
Reference in New Issue
Block a user