Changeset ee42e43 in mainline for kernel/generic/src/proc


Ignore:
Timestamp:
2010-06-22T11:29:40Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a49a1a1
Parents:
fdaad75d
Message:

Retire kernel rwlocks.

Location:
kernel/generic/src/proc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/proc/scheduler.c

    rfdaad75d ree42e43  
    455455                        irq_spinlock_unlock(&THREAD->sleep_queue->lock, false);
    456456                       
    457                         /*
    458                          * Check for possible requests for out-of-context
    459                          * invocation.
    460                          *
    461                          */
    462                         if (THREAD->call_me) {
    463                                 THREAD->call_me(THREAD->call_me_with);
    464                                 THREAD->call_me = NULL;
    465                                 THREAD->call_me_with = NULL;
    466                         }
    467                        
    468457                        irq_spinlock_unlock(&THREAD->lock, false);
    469                        
    470458                        break;
    471459               
  • kernel/generic/src/proc/thread.c

    rfdaad75d ree42e43  
    4848#include <synch/spinlock.h>
    4949#include <synch/waitq.h>
    50 #include <synch/rwlock.h>
    5150#include <cpu.h>
    5251#include <str.h>
     
    329328        thread->flags = flags;
    330329        thread->state = Entering;
    331         thread->call_me = NULL;
    332         thread->call_me_with = NULL;
    333330       
    334331        timeout_initialize(&thread->sleep_timeout);
     
    343340        thread->detached = false;
    344341        waitq_initialize(&thread->join_wq);
    345        
    346         thread->rwlock_holder_type = RWLOCK_NONE;
    347342       
    348343        thread->task = task;
     
    583578       
    584579        (void) waitq_sleep_timeout(&wq, usec, SYNCH_FLAGS_NON_BLOCKING);
    585 }
    586 
    587 /** Register thread out-of-context invocation
    588  *
    589  * Register a function and its argument to be executed
    590  * on next context switch to the current thread. Must
    591  * be called with interrupts disabled.
    592  *
    593  * @param call_me      Out-of-context function.
    594  * @param call_me_with Out-of-context function argument.
    595  *
    596  */
    597 void thread_register_call_me(void (* call_me)(void *), void *call_me_with)
    598 {
    599         irq_spinlock_lock(&THREAD->lock, false);
    600         THREAD->call_me = call_me;
    601         THREAD->call_me_with = call_me_with;
    602         irq_spinlock_unlock(&THREAD->lock, false);
    603580}
    604581
Note: See TracChangeset for help on using the changeset viewer.