Changeset e957846 in rtems-libbsd


Ignore:
Timestamp:
May 1, 2012, 6:08:03 PM (8 years ago)
Author:
Jennifer Averett <jennifer.averett@…>
Branches:
4.11, b96abfd647154f10ea8f7fac68e25676636eded5, 7f47f2784138109b8363804c2aecd3d83231ab0f, f1f03620800b14146977d78fb4322d80da04b53a, freebsd-9.3, 90a9fd66e0a85d8520bbb4bbcb72bfd274965961
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.