Lines Matching refs:thread_ptr
376 TX_THREAD *thread_ptr; in _tx_semaphore_get() local
419 …ion, semaphore_ptr -> tx_semaphore_count, TX_POINTER_TO_ULONG_CONVERT(&thread_ptr), TX_TRACE_SEMAP… in _tx_semaphore_get()
451 TX_THREAD_GET_CURRENT(thread_ptr) in _tx_semaphore_get()
454 thread_ptr -> tx_thread_suspend_cleanup = &(_tx_semaphore_cleanup); in _tx_semaphore_get()
458 thread_ptr -> tx_thread_suspend_control_block = (VOID *) semaphore_ptr; in _tx_semaphore_get()
466 semaphore_ptr -> tx_semaphore_suspension_list = thread_ptr; in _tx_semaphore_get()
467 thread_ptr -> tx_thread_suspended_next = thread_ptr; in _tx_semaphore_get()
468 thread_ptr -> tx_thread_suspended_previous = thread_ptr; in _tx_semaphore_get()
475 thread_ptr -> tx_thread_suspended_next = next_thread; in _tx_semaphore_get()
477 thread_ptr -> tx_thread_suspended_previous = previous_thread; in _tx_semaphore_get()
478 previous_thread -> tx_thread_suspended_next = thread_ptr; in _tx_semaphore_get()
479 next_thread -> tx_thread_suspended_previous = thread_ptr; in _tx_semaphore_get()
486 thread_ptr -> tx_thread_state = TX_SEMAPHORE_SUSP; in _tx_semaphore_get()
491 _tx_thread_system_ni_suspend(thread_ptr, wait_option); in _tx_semaphore_get()
498 thread_ptr -> tx_thread_suspending = TX_TRUE; in _tx_semaphore_get()
501 thread_ptr -> tx_thread_timer.tx_timer_internal_remaining_ticks = wait_option; in _tx_semaphore_get()
510 _tx_thread_system_suspend(thread_ptr); in _tx_semaphore_get()
514 status = thread_ptr -> tx_thread_suspend_status; in _tx_semaphore_get()
716 UINT _tx_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, VOID (*entry_function)(ULONG id), UL… in _tx_thread_create() argument
800 TX_MEMSET(thread_ptr, 0, (sizeof(TX_THREAD))); in _tx_thread_create()
803 thread_ptr -> tx_thread_name = name_ptr; in _tx_thread_create()
804 thread_ptr -> tx_thread_entry = entry_function; in _tx_thread_create()
805 thread_ptr -> tx_thread_entry_parameter = entry_input; in _tx_thread_create()
806 thread_ptr -> tx_thread_stack_start = stack_start; in _tx_thread_create()
807 thread_ptr -> tx_thread_stack_size = stack_size; in _tx_thread_create()
808 …thread_ptr -> tx_thread_stack_end = (VOID *) (TX_UCHAR_POINTER_ADD(stack_start, (stack_siz… in _tx_thread_create()
809 thread_ptr -> tx_thread_priority = priority; in _tx_thread_create()
810 thread_ptr -> tx_thread_user_priority = priority; in _tx_thread_create()
811 thread_ptr -> tx_thread_time_slice = time_slice; in _tx_thread_create()
812 thread_ptr -> tx_thread_new_time_slice = time_slice; in _tx_thread_create()
813 thread_ptr -> tx_thread_inherit_priority = ((UINT) TX_MAX_PRIORITIES); in _tx_thread_create()
818 thread_ptr -> tx_thread_stack_end = TX_UCHAR_TO_VOID_POINTER_CONVERT(temp_ptr); in _tx_thread_create()
823 thread_ptr -> tx_thread_preempt_threshold = preempt_threshold; in _tx_thread_create()
824 thread_ptr -> tx_thread_user_preempt_threshold = preempt_threshold; in _tx_thread_create()
833 thread_ptr -> tx_thread_preempt_threshold = ((UINT) 0); in _tx_thread_create()
834 thread_ptr -> tx_thread_user_preempt_threshold = ((UINT) 0); in _tx_thread_create()
840 thread_ptr -> tx_thread_preempt_threshold = priority; in _tx_thread_create()
841 thread_ptr -> tx_thread_user_preempt_threshold = priority; in _tx_thread_create()
846 thread_ptr -> tx_thread_state = TX_SUSPENDED; in _tx_thread_create()
849 TX_THREAD_CREATE_TIMEOUT_SETUP(thread_ptr) in _tx_thread_create()
852 TX_THREAD_CREATE_INTERNAL_EXTENSION(thread_ptr) in _tx_thread_create()
857 _tx_thread_stack_build(thread_ptr, _tx_thread_shell_entry); in _tx_thread_create()
862 thread_ptr -> tx_thread_stack_highest_ptr = thread_ptr -> tx_thread_stack_ptr; in _tx_thread_create()
869 thread_ptr -> tx_thread_id = TX_THREAD_ID; in _tx_thread_create()
877 _tx_thread_created_ptr = thread_ptr; in _tx_thread_create()
878 thread_ptr -> tx_thread_created_next = thread_ptr; in _tx_thread_create()
879 thread_ptr -> tx_thread_created_previous = thread_ptr; in _tx_thread_create()
889 next_thread -> tx_thread_created_previous = thread_ptr; in _tx_thread_create()
890 previous_thread -> tx_thread_created_next = thread_ptr; in _tx_thread_create()
893 thread_ptr -> tx_thread_created_previous = previous_thread; in _tx_thread_create()
894 thread_ptr -> tx_thread_created_next = next_thread; in _tx_thread_create()
901 …TX_TRACE_OBJECT_REGISTER(TX_TRACE_OBJECT_TYPE_THREAD, thread_ptr, name_ptr, TX_POINTER_TO_ULONG_CO… in _tx_thread_create()
904 …TX_TRACE_IN_LINE_INSERT(TX_TRACE_THREAD_CREATE, thread_ptr, priority, TX_POINTER_TO_ULONG_CONVERT(… in _tx_thread_create()
907 TX_EL_THREAD_REGISTER(thread_ptr) in _tx_thread_create()
960 TX_THREAD_CREATE_EXTENSION(thread_ptr) in _tx_thread_create()
963 _tx_thread_system_ni_resume(thread_ptr); in _tx_thread_create()
973 TX_THREAD_CREATE_EXTENSION(thread_ptr) in _tx_thread_create()
976 _tx_thread_system_resume(thread_ptr); in _tx_thread_create()
994 TX_THREAD_CREATE_EXTENSION(thread_ptr) in _tx_thread_create()
1004 TX_THREAD_CREATE_EXTENSION(thread_ptr) in _tx_thread_create()
1029 TX_THREAD *thread_ptr; in _tx_mutex_get() local
1065 TX_THREAD_GET_CURRENT(thread_ptr) in _tx_mutex_get()
1075 mutex_ptr -> tx_mutex_owner = thread_ptr; in _tx_mutex_get()
1078 if (thread_ptr != TX_NULL) in _tx_mutex_get()
1086 mutex_ptr -> tx_mutex_original_priority = thread_ptr -> tx_thread_priority; in _tx_mutex_get()
1093 next_mutex = thread_ptr -> tx_thread_owned_mutex_list; in _tx_mutex_get()
1116 thread_ptr -> tx_thread_owned_mutex_list = mutex_ptr; in _tx_mutex_get()
1122 thread_ptr -> tx_thread_owned_mutex_count++; in _tx_mutex_get()
1133 else if (mutex_ptr -> tx_mutex_owner == thread_ptr) in _tx_mutex_get()
1167 if (thread_ptr -> tx_thread_priority < mutex_owner -> tx_thread_priority) in _tx_mutex_get()
1184 thread_ptr -> tx_thread_performance_priority_inversion_count++; in _tx_mutex_get()
1190 thread_ptr -> tx_thread_suspend_cleanup = &(_tx_mutex_cleanup); in _tx_mutex_get()
1194 thread_ptr -> tx_thread_suspend_control_block = (VOID *) mutex_ptr; in _tx_mutex_get()
1202 mutex_ptr -> tx_mutex_suspension_list = thread_ptr; in _tx_mutex_get()
1203 thread_ptr -> tx_thread_suspended_next = thread_ptr; in _tx_mutex_get()
1204 thread_ptr -> tx_thread_suspended_previous = thread_ptr; in _tx_mutex_get()
1211 thread_ptr -> tx_thread_suspended_next = next_thread; in _tx_mutex_get()
1213 thread_ptr -> tx_thread_suspended_previous = previous_thread; in _tx_mutex_get()
1214 previous_thread -> tx_thread_suspended_next = thread_ptr; in _tx_mutex_get()
1215 next_thread -> tx_thread_suspended_previous = thread_ptr; in _tx_mutex_get()
1222 thread_ptr -> tx_thread_state = TX_MUTEX_SUSP; in _tx_mutex_get()
1232 … if (mutex_ptr -> tx_mutex_highest_priority_waiting > thread_ptr -> tx_thread_priority) in _tx_mutex_get()
1236 … mutex_ptr -> tx_mutex_highest_priority_waiting = thread_ptr -> tx_thread_priority; in _tx_mutex_get()
1240 if (mutex_owner -> tx_thread_priority > thread_ptr -> tx_thread_priority) in _tx_mutex_get()
1245 _tx_mutex_priority_change(mutex_owner, thread_ptr -> tx_thread_priority); in _tx_mutex_get()
1259 _tx_thread_system_ni_suspend(thread_ptr, wait_option); in _tx_mutex_get()
1266 thread_ptr -> tx_thread_suspending = TX_TRUE; in _tx_mutex_get()
1269 thread_ptr -> tx_thread_timer.tx_timer_internal_remaining_ticks = wait_option; in _tx_mutex_get()
1283 … if (mutex_ptr -> tx_mutex_highest_priority_waiting > thread_ptr -> tx_thread_priority) in _tx_mutex_get()
1287 … mutex_ptr -> tx_mutex_highest_priority_waiting = thread_ptr -> tx_thread_priority; in _tx_mutex_get()
1291 if (mutex_owner -> tx_thread_priority > thread_ptr -> tx_thread_priority) in _tx_mutex_get()
1296 _tx_mutex_priority_change(mutex_owner, thread_ptr -> tx_thread_priority); in _tx_mutex_get()
1310 _tx_thread_system_suspend(thread_ptr); in _tx_mutex_get()
1313 status = thread_ptr -> tx_thread_suspend_status; in _tx_mutex_get()
1427 UINT _tx_thread_preemption_change(TX_THREAD *thread_ptr, UINT new_threshold, UINT *old_threshold) in _tx_thread_preemption_change() argument
1439 UX_TEST_OVERRIDE_TX_THREAD_PREEMPTION_CHANGE_PARAMS params = { thread_ptr, new_threshold }; in _tx_thread_preemption_change()
1454 if (thread_ptr -> tx_thread_user_priority != new_threshold) in _tx_thread_preemption_change()
1472 …(TX_TRACE_THREAD_PREEMPTION_CHANGE, thread_ptr, new_threshold, thread_ptr -> tx_thread_preempt_thr… in _tx_thread_preemption_change()
1478 if (new_threshold > thread_ptr -> tx_thread_user_priority) in _tx_thread_preemption_change()
1490 if (thread_ptr -> tx_thread_user_priority == new_threshold) in _tx_thread_preemption_change()
1494 if (_tx_thread_priority_list[thread_ptr -> tx_thread_priority] == thread_ptr) in _tx_thread_preemption_change()
1500 map_index = (thread_ptr -> tx_thread_priority)/((UINT) 32); in _tx_thread_preemption_change()
1505 TX_MOD32_BIT_SET(thread_ptr -> tx_thread_priority, priority_bit) in _tx_thread_preemption_change()
1515 TX_DIV32_BIT_SET(thread_ptr -> tx_thread_priority, priority_bit) in _tx_thread_preemption_change()
1524 *old_threshold = thread_ptr -> tx_thread_user_preempt_threshold; in _tx_thread_preemption_change()
1527 thread_ptr -> tx_thread_user_preempt_threshold = new_threshold; in _tx_thread_preemption_change()
1530 if (new_threshold < thread_ptr -> tx_thread_inherit_priority) in _tx_thread_preemption_change()
1534 thread_ptr -> tx_thread_preempt_threshold = new_threshold; in _tx_thread_preemption_change()
1540 thread_ptr -> tx_thread_preempt_threshold = thread_ptr -> tx_thread_inherit_priority; in _tx_thread_preemption_change()
1544 if (_tx_thread_highest_priority < thread_ptr -> tx_thread_priority) in _tx_thread_preemption_change()
1552 if (_tx_thread_execute_ptr == thread_ptr) in _tx_thread_preemption_change()
1560 … if (thread_ptr -> tx_thread_preempt_threshold != thread_ptr -> tx_thread_priority) in _tx_thread_preemption_change()
1566 map_index = (thread_ptr -> tx_thread_priority)/((UINT) 32); in _tx_thread_preemption_change()
1569 TX_DIV32_BIT_SET(thread_ptr -> tx_thread_priority, priority_bit) in _tx_thread_preemption_change()
1574 TX_MOD32_BIT_SET(thread_ptr -> tx_thread_priority, priority_bit) in _tx_thread_preemption_change()
1589 thread_ptr -> tx_thread_performance_solicited_preemption_count++; in _tx_thread_preemption_change()
1593 …thread_ptr -> tx_thread_performance_last_preempting_thread = _tx_thread_priority_list[_tx_thread_… in _tx_thread_preemption_change()
1766 TX_THREAD *thread_ptr; in _tx_mutex_put() local
1809 thread_ptr = mutex_ptr -> tx_mutex_owner; in _tx_mutex_put()
1855 if (thread_ptr == TX_NULL) in _tx_mutex_put()
1872 thread_ptr -> tx_thread_owned_mutex_count--; in _tx_mutex_put()
1875 if (thread_ptr -> tx_thread_owned_mutex_count == ((UINT) 0)) in _tx_mutex_put()
1879 thread_ptr -> tx_thread_owned_mutex_list = TX_NULL; in _tx_mutex_put()
1893 if (thread_ptr -> tx_thread_owned_mutex_list == mutex_ptr) in _tx_mutex_put()
1897 thread_ptr -> tx_thread_owned_mutex_list = next_mutex; in _tx_mutex_put()
1926 old_priority = thread_ptr -> tx_thread_user_priority; in _tx_mutex_put()
1943 next_mutex = thread_ptr -> tx_thread_owned_mutex_list; in _tx_mutex_put()
1965 if (next_mutex == thread_ptr -> tx_thread_owned_mutex_list) in _tx_mutex_put()
2092 thread_ptr = mutex_ptr -> tx_mutex_suspension_list; in _tx_mutex_put()
2103 … mutex_ptr -> tx_mutex_original_priority = thread_ptr -> tx_thread_priority; in _tx_mutex_put()
2110 owned_count = thread_ptr -> tx_thread_owned_mutex_count; in _tx_mutex_put()
2117 thread_ptr -> tx_thread_owned_mutex_list = mutex_ptr; in _tx_mutex_put()
2127 … next_mutex = thread_ptr -> tx_thread_owned_mutex_list; in _tx_mutex_put()
2140 thread_ptr -> tx_thread_owned_mutex_count = owned_count + ((UINT) 1); in _tx_mutex_put()
2144 mutex_ptr -> tx_mutex_owner = thread_ptr; in _tx_mutex_put()
2169 … next_thread = thread_ptr -> tx_thread_suspended_next; in _tx_mutex_put()
2173 … previous_thread = thread_ptr -> tx_thread_suspended_previous; in _tx_mutex_put()
2181 thread_ptr -> tx_thread_suspend_cleanup = TX_NULL; in _tx_mutex_put()
2184 thread_ptr -> tx_thread_suspend_status = TX_SUCCESS; in _tx_mutex_put()
2242 _tx_thread_system_ni_resume(thread_ptr); in _tx_mutex_put()
2309 _tx_thread_system_resume(thread_ptr); in _tx_mutex_put()
2527 TX_THREAD *thread_ptr; /* Working thread pointer */ in _nx_packet_allocate() local
2654 thread_ptr = _tx_thread_current_ptr; in _nx_packet_allocate()
2657 thread_ptr -> tx_thread_suspend_cleanup = _nx_packet_pool_cleanup; in _nx_packet_allocate()
2661 thread_ptr -> tx_thread_suspend_control_block = (void *)pool_ptr; in _nx_packet_allocate()
2664 thread_ptr -> tx_thread_additional_suspend_info = (void *)packet_ptr; in _nx_packet_allocate()
2668 thread_ptr -> tx_thread_suspend_info = packet_type; in _nx_packet_allocate()
2675 thread_ptr -> tx_thread_suspended_next = in _nx_packet_allocate()
2677 thread_ptr -> tx_thread_suspended_previous = in _nx_packet_allocate()
2680 thread_ptr; in _nx_packet_allocate()
2681 … (pool_ptr -> nx_packet_pool_suspension_list) -> tx_thread_suspended_previous = thread_ptr; in _nx_packet_allocate()
2688 pool_ptr -> nx_packet_pool_suspension_list = thread_ptr; in _nx_packet_allocate()
2689 thread_ptr -> tx_thread_suspended_next = thread_ptr; in _nx_packet_allocate()
2690 thread_ptr -> tx_thread_suspended_previous = thread_ptr; in _nx_packet_allocate()
2697 thread_ptr -> tx_thread_state = TX_TCP_IP; in _nx_packet_allocate()
2700 thread_ptr -> tx_thread_suspending = TX_TRUE; in _nx_packet_allocate()
2706 thread_ptr -> tx_thread_timer.tx_timer_internal_remaining_ticks = wait_option; in _nx_packet_allocate()
2712 _tx_thread_system_suspend(thread_ptr); in _nx_packet_allocate()
2718 if (thread_ptr -> tx_thread_suspend_status == NX_SUCCESS) in _nx_packet_allocate()
2727 return(thread_ptr -> tx_thread_suspend_status); in _nx_packet_allocate()