Skip to content

Commit 3842d37

Browse files
committed
modify annotation for sys_arch_mbox_tryfetch
1 parent 9e89fa1 commit 3842d37

File tree

4 files changed

+44
-8
lines changed

4 files changed

+44
-8
lines changed

components/net/lwip-1.4.1/src/arch/sys_arch.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,10 +515,19 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout)
515515
return tick;
516516
}
517517

518-
/** Wait for a new message to arrive in the mbox
518+
/**
519+
* @ingroup sys_mbox
520+
* This is similar to sys_arch_mbox_fetch, however if a message is not
521+
* present in the mailbox, it immediately returns with the code
522+
* SYS_MBOX_EMPTY. On success 0 is returned.
523+
* To allow for efficient implementations, this can be defined as a
524+
* function-like macro in sys_arch.h instead of a normal function. For
525+
* example, a naive implementation could be:
526+
* \#define sys_arch_mbox_tryfetch(mbox,msg) sys_arch_mbox_fetch(mbox,msg,1)
527+
* although this would introduce unnecessary delays.
528+
*
519529
* @param mbox mbox to get a message from
520530
* @param msg pointer where the message is stored
521-
* @param timeout maximum time (in milliseconds) to wait for a message
522531
* @return 0 (milliseconds) if a message has been received
523532
* or SYS_MBOX_EMPTY if the mailbox is empty
524533
*/

components/net/lwip-2.0.2/src/arch/sys_arch.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,10 +526,19 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout)
526526
return tick;
527527
}
528528

529-
/** Wait for a new message to arrive in the mbox
529+
/**
530+
* @ingroup sys_mbox
531+
* This is similar to sys_arch_mbox_fetch, however if a message is not
532+
* present in the mailbox, it immediately returns with the code
533+
* SYS_MBOX_EMPTY. On success 0 is returned.
534+
* To allow for efficient implementations, this can be defined as a
535+
* function-like macro in sys_arch.h instead of a normal function. For
536+
* example, a naive implementation could be:
537+
* \#define sys_arch_mbox_tryfetch(mbox,msg) sys_arch_mbox_fetch(mbox,msg,1)
538+
* although this would introduce unnecessary delays.
539+
*
530540
* @param mbox mbox to get a message from
531541
* @param msg pointer where the message is stored
532-
* @param timeout maximum time (in milliseconds) to wait for a message
533542
* @return 0 (milliseconds) if a message has been received
534543
* or SYS_MBOX_EMPTY if the mailbox is empty
535544
*/

components/net/lwip-2.0.3/src/arch/sys_arch.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,10 +526,19 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout)
526526
return tick;
527527
}
528528

529-
/** Wait for a new message to arrive in the mbox
529+
/**
530+
* @ingroup sys_mbox
531+
* This is similar to sys_arch_mbox_fetch, however if a message is not
532+
* present in the mailbox, it immediately returns with the code
533+
* SYS_MBOX_EMPTY. On success 0 is returned.
534+
* To allow for efficient implementations, this can be defined as a
535+
* function-like macro in sys_arch.h instead of a normal function. For
536+
* example, a naive implementation could be:
537+
* \#define sys_arch_mbox_tryfetch(mbox,msg) sys_arch_mbox_fetch(mbox,msg,1)
538+
* although this would introduce unnecessary delays.
539+
*
530540
* @param mbox mbox to get a message from
531541
* @param msg pointer where the message is stored
532-
* @param timeout maximum time (in milliseconds) to wait for a message
533542
* @return 0 (milliseconds) if a message has been received
534543
* or SYS_MBOX_EMPTY if the mailbox is empty
535544
*/

components/net/lwip-2.1.2/src/arch/sys_arch.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,10 +540,19 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout)
540540
return tick;
541541
}
542542

543-
/** Wait for a new message to arrive in the mbox
543+
/**
544+
* @ingroup sys_mbox
545+
* This is similar to sys_arch_mbox_fetch, however if a message is not
546+
* present in the mailbox, it immediately returns with the code
547+
* SYS_MBOX_EMPTY. On success 0 is returned.
548+
* To allow for efficient implementations, this can be defined as a
549+
* function-like macro in sys_arch.h instead of a normal function. For
550+
* example, a naive implementation could be:
551+
* \#define sys_arch_mbox_tryfetch(mbox,msg) sys_arch_mbox_fetch(mbox,msg,1)
552+
* although this would introduce unnecessary delays.
553+
*
544554
* @param mbox mbox to get a message from
545555
* @param msg pointer where the message is stored
546-
* @param timeout maximum time (in milliseconds) to wait for a message
547556
* @return 0 (milliseconds) if a message has been received
548557
* or SYS_MBOX_EMPTY if the mailbox is empty
549558
*/

0 commit comments

Comments
 (0)