mirror of https://github.com/RT-Thread/rt-thread
modify annotation for sys_arch_mbox_tryfetch
This commit is contained in:
parent
9e89fa158d
commit
3842d3749c
|
@ -515,10 +515,19 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout)
|
||||||
return tick;
|
return tick;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Wait for a new message to arrive in the mbox
|
/**
|
||||||
|
* @ingroup sys_mbox
|
||||||
|
* This is similar to sys_arch_mbox_fetch, however if a message is not
|
||||||
|
* present in the mailbox, it immediately returns with the code
|
||||||
|
* SYS_MBOX_EMPTY. On success 0 is returned.
|
||||||
|
* To allow for efficient implementations, this can be defined as a
|
||||||
|
* function-like macro in sys_arch.h instead of a normal function. For
|
||||||
|
* example, a naive implementation could be:
|
||||||
|
* \#define sys_arch_mbox_tryfetch(mbox,msg) sys_arch_mbox_fetch(mbox,msg,1)
|
||||||
|
* although this would introduce unnecessary delays.
|
||||||
|
*
|
||||||
* @param mbox mbox to get a message from
|
* @param mbox mbox to get a message from
|
||||||
* @param msg pointer where the message is stored
|
* @param msg pointer where the message is stored
|
||||||
* @param timeout maximum time (in milliseconds) to wait for a message
|
|
||||||
* @return 0 (milliseconds) if a message has been received
|
* @return 0 (milliseconds) if a message has been received
|
||||||
* or SYS_MBOX_EMPTY if the mailbox is empty
|
* or SYS_MBOX_EMPTY if the mailbox is empty
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -526,10 +526,19 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout)
|
||||||
return tick;
|
return tick;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Wait for a new message to arrive in the mbox
|
/**
|
||||||
|
* @ingroup sys_mbox
|
||||||
|
* This is similar to sys_arch_mbox_fetch, however if a message is not
|
||||||
|
* present in the mailbox, it immediately returns with the code
|
||||||
|
* SYS_MBOX_EMPTY. On success 0 is returned.
|
||||||
|
* To allow for efficient implementations, this can be defined as a
|
||||||
|
* function-like macro in sys_arch.h instead of a normal function. For
|
||||||
|
* example, a naive implementation could be:
|
||||||
|
* \#define sys_arch_mbox_tryfetch(mbox,msg) sys_arch_mbox_fetch(mbox,msg,1)
|
||||||
|
* although this would introduce unnecessary delays.
|
||||||
|
*
|
||||||
* @param mbox mbox to get a message from
|
* @param mbox mbox to get a message from
|
||||||
* @param msg pointer where the message is stored
|
* @param msg pointer where the message is stored
|
||||||
* @param timeout maximum time (in milliseconds) to wait for a message
|
|
||||||
* @return 0 (milliseconds) if a message has been received
|
* @return 0 (milliseconds) if a message has been received
|
||||||
* or SYS_MBOX_EMPTY if the mailbox is empty
|
* or SYS_MBOX_EMPTY if the mailbox is empty
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -526,10 +526,19 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout)
|
||||||
return tick;
|
return tick;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Wait for a new message to arrive in the mbox
|
/**
|
||||||
|
* @ingroup sys_mbox
|
||||||
|
* This is similar to sys_arch_mbox_fetch, however if a message is not
|
||||||
|
* present in the mailbox, it immediately returns with the code
|
||||||
|
* SYS_MBOX_EMPTY. On success 0 is returned.
|
||||||
|
* To allow for efficient implementations, this can be defined as a
|
||||||
|
* function-like macro in sys_arch.h instead of a normal function. For
|
||||||
|
* example, a naive implementation could be:
|
||||||
|
* \#define sys_arch_mbox_tryfetch(mbox,msg) sys_arch_mbox_fetch(mbox,msg,1)
|
||||||
|
* although this would introduce unnecessary delays.
|
||||||
|
*
|
||||||
* @param mbox mbox to get a message from
|
* @param mbox mbox to get a message from
|
||||||
* @param msg pointer where the message is stored
|
* @param msg pointer where the message is stored
|
||||||
* @param timeout maximum time (in milliseconds) to wait for a message
|
|
||||||
* @return 0 (milliseconds) if a message has been received
|
* @return 0 (milliseconds) if a message has been received
|
||||||
* or SYS_MBOX_EMPTY if the mailbox is empty
|
* or SYS_MBOX_EMPTY if the mailbox is empty
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -540,10 +540,19 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout)
|
||||||
return tick;
|
return tick;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Wait for a new message to arrive in the mbox
|
/**
|
||||||
|
* @ingroup sys_mbox
|
||||||
|
* This is similar to sys_arch_mbox_fetch, however if a message is not
|
||||||
|
* present in the mailbox, it immediately returns with the code
|
||||||
|
* SYS_MBOX_EMPTY. On success 0 is returned.
|
||||||
|
* To allow for efficient implementations, this can be defined as a
|
||||||
|
* function-like macro in sys_arch.h instead of a normal function. For
|
||||||
|
* example, a naive implementation could be:
|
||||||
|
* \#define sys_arch_mbox_tryfetch(mbox,msg) sys_arch_mbox_fetch(mbox,msg,1)
|
||||||
|
* although this would introduce unnecessary delays.
|
||||||
|
*
|
||||||
* @param mbox mbox to get a message from
|
* @param mbox mbox to get a message from
|
||||||
* @param msg pointer where the message is stored
|
* @param msg pointer where the message is stored
|
||||||
* @param timeout maximum time (in milliseconds) to wait for a message
|
|
||||||
* @return 0 (milliseconds) if a message has been received
|
* @return 0 (milliseconds) if a message has been received
|
||||||
* or SYS_MBOX_EMPTY if the mailbox is empty
|
* or SYS_MBOX_EMPTY if the mailbox is empty
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue