/* Try to posts the "msg" to the mailbox.  */
err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg)
/* Try to posts the "msg" to the mailbox.  */
err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg)
{
    u8_t     err;
    u8_t  i=0; 
    if(msg == NULL ) 
        msg = (void*)null_pointer;
    while (i < 10){
	err = tls_os_queue_send(*mbox, msg, 0);
        if(err == TLS_OS_SUCCESS)
            return ERR_OK;
        i++;
        tls_os_time_delay(1);
    }
    return ERR_ABRT;    
}