Created
October 8, 2014 04:57
-
-
Save master-q/8545868d9951e0011b07 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function = chx_fatal | |
return type: void | |
uint32_t err_code | |
-> Error code | |
Description: | |
-> When it detects a coding error, this function will be called to | |
stop further execution of code. It never returns. | |
Function = chopstx_create | |
return type: chopstx_t | |
uint32_t flags_and_prio | |
-> Flags and priority | |
uint32_t stack_addr | |
-> Stack address | |
size_t stack_size | |
-> Size of stack | |
voidfunc thread_entry | |
-> Entry function of new thread | |
void * arg | |
-> Argument to the thread entry function | |
Description: | |
-> Create a thread. | |
Function = chopstx_usec_wait_var | |
return type: void | |
uint32_t * var | |
-> Pointer to usec | |
Description: | |
-> Sleep for micro seconds, specified by var. | |
Another thread can clear var to stop the caller going into sleep. | |
Function = chopstx_usec_wait | |
return type: void | |
uint32_t usec | |
-> number of micro seconds | |
Description: | |
-> Sleep for usec. | |
Function = chopstx_mutex_init | |
return type: void | |
chopstx_mutex_t * mutex | |
-> Mutex | |
Description: | |
-> Initialize mutex. | |
Function = chopstx_mutex_lock | |
return type: void | |
chopstx_mutex_t * mutex | |
-> Mutex | |
Description: | |
-> Lock mutex. | |
Function = chopstx_mutex_unlock | |
return type: void | |
chopstx_mutex_t * mutex | |
-> Mutex | |
Description: | |
-> Unlock mutex. | |
Function = chopstx_cond_init | |
return type: void | |
chopstx_cond_t * cond | |
-> Condition variable | |
Description: | |
-> Initialize cond. | |
Function = chopstx_cond_wait | |
return type: void | |
chopstx_cond_t * cond | |
-> Condition variable | |
chopstx_mutex_t * mutex | |
-> Associated mutex | |
Description: | |
-> Wait for cond with mutex. | |
Function = chopstx_cond_signal | |
return type: void | |
chopstx_cond_t * cond | |
-> Condition variable | |
Description: | |
-> Wake up a thread waiting on cond. | |
Function = chopstx_cond_broadcast | |
return type: void | |
chopstx_cond_t * cond | |
-> Condition Variable | |
Description: | |
-> Wake up all threads waiting on cond. | |
Function = chopstx_claim_irq | |
return type: void | |
chopstx_intr_t * intr | |
-> Pointer to INTR structure | |
uint8_t irq_num | |
-> IRQ Number (hardware specific) | |
Description: | |
-> Claim interrupt intr with irq_num for this thread. | |
Function = chopstx_release_irq | |
return type: void | |
chopstx_intr_t * intr0 | |
-> Interrupt request to be unregistered | |
Description: | |
-> Release the interrupt request specified by intr0. | |
Function = chopstx_intr_wait | |
return type: void | |
chopstx_intr_t * intr | |
-> Pointer to INTR structure | |
Description: | |
-> Wait for the interrupt intr to be occured. | |
Function = chopstx_cleanup_push | |
return type: void | |
struct chx_cleanup * clp | |
-> Pointer to clean-up structure | |
Description: | |
-> Register a clean-up structure. | |
Function = chopstx_cleanup_pop | |
return type: void | |
int execute | |
-> Execute the clen-up function on release | |
Description: | |
-> Unregister a clean-up structure. When execute is non-zero, the | |
clean-up will be executed. | |
Function = chopstx_exit | |
return type: void | |
void * retval | |
-> Return value (to be caught by a joining thread) | |
Description: | |
-> Calling this function terminates the execution of thread, after | |
calling clean up functions. If the calling thread still holds | |
mutexes, they will be released. If the calling thread claiming | |
IRQ, it will be released, too. This function never returns. | |
Function = chopstx_join | |
return type: void | |
chopstx_t thd | |
-> Thread to wait | |
void ** ret | |
-> Pointer to void * to store return value | |
Description: | |
-> Waits for the thread of thd to terminate. | |
Function = chopstx_wakeup_usec_wait | |
return type: void | |
chopstx_t thd | |
-> Thread to be awakened | |
Description: | |
-> Canceling the timer, wake up the sleeping thread. | |
No return value. | |
Function = chopstx_cancel | |
return type: void | |
chopstx_t thd | |
-> Thread to be canceled | |
Description: | |
-> This function requests a cancellation of a thread thd. | |
No return value. | |
Function = chopstx_testcancel | |
return type: void | |
void | |
-> | |
Description: | |
-> | |
Calling chopstx_testcancel creates a cancellation point. | |
No return value. If the thread is canceled, this function | |
does not return. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run "./doc/gdoc -html chopstx.c > chopstx-api.html" to get this.
http://git.gniibe.org/gitweb/?p=chopstx/chopstx.git;a=summary