Changeset e957846 in rtems-libbsd


Ignore:
Timestamp:
05/01/12 18:08:03 (12 years ago)
Author:
Jennifer Averett <jennifer.averett@…>
Branches:
4.11, 5, 5-freebsd-12, 6-freebsd-12, freebsd-9.3, master
Children:
a51d36d2
Parents:
f59bd57
Message:

Modifed sleep queue to be priority based and added the wakeup_one method.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtemsbsd/src/rtems-bsd-synch.c

    rf59bd57 re957846  
    7272    _Thread_queue_Initialize(
    7373      &sleep_queue[ii].queue,
    74       THREAD_QUEUE_DISCIPLINE_FIFO,
     74      THREAD_QUEUE_DISCIPLINE_PRIORITY,
    7575      STATES_WAITING_FOR_SLEEP | STATES_INTERRUPTIBLE_BY_SIGNAL,
    7676      EAGAIN
     
    274274}
    275275
     276/*
     277 * Make a thread sleeping on the specified identifier runnable.
     278 * May wake more than one thread if a target thread is currently
     279 * swapped out.
     280 */
     281void
     282wakeup_one(void *ident)
     283{
     284  sleep_queue_control_t *sq;
     285  Thread_Control *the_thread;
     286
     287  sq = sleep_queue_lookup( ident );
     288  if (sq == NULL)
     289  {
     290    return (0);
     291  }
     292  the_thread = _Thread_queue_Dequeue(&sq->queue);
     293  return 0;
     294
     295}
     296
Note: See TracChangeset for help on using the changeset viewer.