Changeset e957846 in rtems-libbsd


Ignore:
Timestamp:
May 1, 2012, 6:08:03 PM (7 years ago)
Author:
Jennifer Averett <jennifer.averett@…>
Branches:
4.11, c1e05b9ea378b2971e3d7704779112b4bc4296da, freebsd-9.3, 4a77611a223ea883fb548679b516d326a020d447
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.