• Marko Mäkelä's avatar
    Bug#11766305 - 59392: Remove thr0loc.c and ibuf_inside() [part 3] · a4d2a3a3
    Marko Mäkelä authored
    Remove the slot_no member of struct thr_local_struct.
    
    enum srv_thread_type: Remove unused thread types.
    srv_get_thread_type(): Unused function, remove.
    
    thr_local_get_slot_no(), thr_local_set_slot_no(): Remove.
    
    srv_thread_type_validate(), srv_slot_get_type(): New functions, for debugging.
    
    srv_table_reserve_slot(): Return the srv_slot_t* directly. Do not create
    thread-local storage.
    
    srv_suspend_thread(): Get the srv_slot_t* as parameter. Return void;
    the caller knows slot->event already.
    
    srv_thread_has_reserved_slot(), srv_release_threads(): Assert
    srv_thread_type_validate(type).
    
    srv_init(): Use mem_zalloc() instead of mem_alloc(). Replace
    srv_table_get_nth_slot(), because it now asserts that the kernel_mutex
    is being held.
    
    srv_master_thread(), srv_purge_thread(): Remember the slot from
    srv_table_reserve_slot().
    
    rb:629 approved by Inaam Rana
    a4d2a3a3
thr0loc.h 2.35 KB