void sort8k_entry( cyg_addrword_t data ) { #ifdef USE_ECOS void *ptr; unsigned int thread_number = ( unsigned int ) data; while ( 1 ) { // get pointer to next chunk of data ptr = cyg_mbox_get( mb_start_handle ); // sort it bubblesort( ( unsigned int * ) ptr, N ); // return cyg_mbox_put( mb_done_handle, ( void * ) 23 ); // return any value } #endif }
/* * Post data to a mbox. */ void sys_mbox_post(sys_mbox_t mbox, void *data) { if (!data) data = &dummy_msg; while (cyg_mbox_put(mbox,data) == false); }