Part Number:PROCESSOR-SDK-AM335X
Tool/software: Linux
Hi,
I am porting an application which was written to run on ecos os. There are some ecos mbox apis to which I am not able to find equivalent posix variants.
AFAIK mbox is used as thread synchronization mechanism in ecos, in which one thread writes in mbox and other thread waits and reads from mbox.
1) cyg_mbox_create (cyg_handle_t *handle, cyg_mbox *mbox ) // creates mbox in kernel
2) cyg_mbox_put( cyg_handle_t mbox, void *item) //writes data in item
3) void *cyg_mbox_get (cyg_handle_t mbox) // waits until something is written in mbox and returns pointer to item
I found these mbox api in ti sdk.
1)mbox_request_channel()
2) mbox_send_message()
3) mbox_client_txdone()
These APIs, I believe, are used for inter-processor communication. So my question is how can use these apis for thread synchronization within same process? Or is there any other better framework to achieve above ecos functionality?