diff options
| author | Yuxin Zhou <[email protected]> | 2021-10-14 00:51:26 +0000 |
|---|---|---|
| committer | Yuxin Zhou <[email protected]> | 2021-10-14 00:51:26 +0000 |
| commit | 1af8404c54f9c8d3caa2ac3523c2a5f014aecb1c (patch) | |
| tree | 93e4f4d64ec8c21c01b77f19b8e7326e85227e3d /common/src/tx_trace_object_register.c | |
| parent | 215df45d4b59d4ce8606a88f566d1d426e64a84c (diff) | |
Release 6.1.9
Diffstat (limited to 'common/src/tx_trace_object_register.c')
| -rw-r--r-- | common/src/tx_trace_object_register.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/common/src/tx_trace_object_register.c b/common/src/tx_trace_object_register.c index e0d24981..da2dafcf 100644 --- a/common/src/tx_trace_object_register.c +++ b/common/src/tx_trace_object_register.c @@ -98,7 +98,7 @@ TX_TRACE_OBJECT_ENTRY *entry_ptr; /* Determine if there are available entries in the registry. */ if (_tx_trace_available_registry_entries != ((ULONG) 0)) { - + /* There are more available entries, proceed. */ /* Initialize found to the max entries... indicating no space was found. */ @@ -125,7 +125,7 @@ TX_TRACE_OBJECT_ENTRY *entry_ptr; loop_break = TX_TRUE; } - /* Determine if this entry matches the object pointer... we must reuse old entries left in the + /* Determine if this entry matches the object pointer... we must reuse old entries left in the registry. */ if (entry_ptr -> tx_trace_object_entry_thread_pointer == TX_POINTER_TO_ULONG_CONVERT(object_ptr)) { @@ -134,11 +134,11 @@ TX_TRACE_OBJECT_ENTRY *entry_ptr; found = i; loop_break = TX_TRUE; } - + /* Determine if we should break out of the loop. */ if (loop_break == TX_TRUE) { - + /* Yes, break out of the loop. */ break; } @@ -154,30 +154,30 @@ TX_TRACE_OBJECT_ENTRY *entry_ptr; } else { - + /* Setup a pointer to the found entry. */ work_ptr = TX_OBJECT_TO_UCHAR_POINTER_CONVERT(_tx_trace_registry_start_ptr); work_ptr = TX_UCHAR_POINTER_ADD(work_ptr, ((sizeof(TX_TRACE_OBJECT_ENTRY))*found)); entry_ptr = TX_UCHAR_TO_OBJECT_POINTER_CONVERT(work_ptr); - + if (entry_ptr -> tx_trace_object_entry_type != ((UCHAR) 0)) { found = i; } } } - + /* Move to the next entry. */ i++; - + /* Determine if we have wrapped the list. */ if (i >= entries) { - + /* Yes, wrap to the beginning of the list. */ i = ((ULONG) 0); } - + } while (i != _tx_trace_registry_search_start); /* Now determine if an empty or reuse entry has been found. */ @@ -190,24 +190,24 @@ TX_TRACE_OBJECT_ENTRY *entry_ptr; /* Adjust the search index to the next entry. */ if ((found + ((ULONG) 1)) < entries) { - + /* Start searching from the next index. */ _tx_trace_registry_search_start = found + ((ULONG) 1); } else { - + /* Reset the search to the beginning of the list. */ _tx_trace_registry_search_start = ((ULONG) 0); } - + /* Yes, an entry has been found... */ - + /* Build a pointer to the found entry. */ work_ptr = TX_OBJECT_TO_UCHAR_POINTER_CONVERT(_tx_trace_registry_start_ptr); work_ptr = TX_UCHAR_POINTER_ADD(work_ptr, ((sizeof(TX_TRACE_OBJECT_ENTRY))*found)); entry_ptr = TX_UCHAR_TO_OBJECT_POINTER_CONVERT(work_ptr); - + /* Populate the found entry! */ entry_ptr -> tx_trace_object_entry_available = ((UCHAR) TX_FALSE); entry_ptr -> tx_trace_object_entry_type = object_type; @@ -222,7 +222,7 @@ TX_TRACE_OBJECT_ENTRY *entry_ptr; /* Setup work pointer to the object name character. */ work_ptr = TX_CHAR_TO_UCHAR_POINTER_CONVERT(object_name); work_ptr = TX_UCHAR_POINTER_ADD(work_ptr, i); - + /* Copy a character of the name. */ entry_ptr -> tx_trace_object_entry_name[i] = (UCHAR) *work_ptr; @@ -241,17 +241,17 @@ TX_TRACE_OBJECT_ENTRY *entry_ptr; { /* Yes, a thread object is present. */ - + /* Setup a pointer to the thread. */ thread_ptr = TX_VOID_TO_THREAD_POINTER_CONVERT(object_ptr); - + /* Store the thread's priority in the reserved bits. */ entry_ptr -> tx_trace_object_entry_reserved1 = ((UCHAR) 0x80) | ((UCHAR) (thread_ptr -> tx_thread_priority >> ((UCHAR) 8))); entry_ptr -> tx_trace_object_entry_reserved2 = (UCHAR) (thread_ptr -> tx_thread_priority & ((UCHAR) 0xFF)); } else { - + /* For all other objects, set the reserved bytes to 0. */ entry_ptr -> tx_trace_object_entry_reserved1 = ((UCHAR) 0); entry_ptr -> tx_trace_object_entry_reserved2 = ((UCHAR) 0); @@ -267,19 +267,19 @@ TX_INTERRUPT_SAVE_AREA /* Access input arguments just for the sake of lint, MISRA, etc. */ if (object_type != ((UCHAR) 0)) { - + if (object_ptr != TX_NULL) { - + if (object_name != TX_NULL) { - + if (parameter_1 != ((ULONG) 0)) { - + if (parameter_2 != ((ULONG) 0)) { - + /* NOP code. */ TX_DISABLE TX_RESTORE |
