Changeset 1d432f9 in mainline for kernel/generic/src/proc/thread.c


Ignore:
Timestamp:
2010-05-31T22:33:44Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
179d052
Parents:
3a2b636
Message:

Reflect assumptions about lock and interrupt state in functions themselves.

File:
1 edited

Legend:

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

    r3a2b636 r1d432f9  
    683683bool thread_exists(thread_t *thread)
    684684{
     685        ASSERT(interrupts_disabled());
     686        ASSERT(irq_spinlock_locked(&threads_lock));
     687
    685688        avltree_node_t *node =
    686689            avltree_search(&threads_tree, (avltree_key_t) ((uintptr_t) thread));
     
    700703{
    701704        uint64_t time = get_cycle();
     705
     706        ASSERT(interrupts_disabled());
     707        ASSERT(irq_spinlock_locked(&THREAD->lock));
    702708       
    703709        if (user)
     
    735741thread_t *thread_find_by_id(thread_id_t thread_id)
    736742{
     743        ASSERT(interrupts_disabled());
     744        ASSERT(irq_spinlock_locked(&threads_lock));
     745
    737746        thread_iterator_t iterator;
    738747       
Note: See TracChangeset for help on using the changeset viewer.