@@ -2020,8 +2020,9 @@ extern void k_queue_merge_slist(struct k_queue *queue, sys_slist_t *list);
2020
2020
* @note Can be called by ISRs, but @a timeout must be set to K_NO_WAIT.
2021
2021
*
2022
2022
* @param queue Address of the queue.
2023
- * @param timeout Waiting period to obtain a data item (in milliseconds),
2024
- * or one of the special values K_NO_WAIT and K_FOREVER.
2023
+ * @param timeout Non-negative waiting period to obtain a data item (in
2024
+ * milliseconds), or one of the special values K_NO_WAIT and
2025
+ * K_FOREVER.
2025
2026
*
2026
2027
* @return Address of the data item if successful; NULL if returned
2027
2028
* without waiting, or waiting period timed out.
@@ -2188,8 +2189,8 @@ struct z_futex_data {
2188
2189
* @param futex Address of the futex.
2189
2190
* @param expected Expected value of the futex, if it is different the caller
2190
2191
* will not wait on it.
2191
- * @param timeout Waiting period on the futex, in milliseconds, or one of the
2192
- * special values K_NO_WAIT or K_FOREVER.
2192
+ * @param timeout Non-negative waiting period on the futex, in milliseconds, or
2193
+ * one of the special values K_NO_WAIT or K_FOREVER.
2193
2194
* @retval -EACCES Caller does not have read access to futex address.
2194
2195
* @retval -EAGAIN If the futex value did not match the expected parameter.
2195
2196
* @retval -EINVAL Futex parameter address not recognized by the kernel.
@@ -2653,15 +2654,17 @@ __syscall void k_stack_push(struct k_stack *stack, stack_data_t data);
2653
2654
*
2654
2655
* @param stack Address of the stack.
2655
2656
* @param data Address of area to hold the value popped from the stack.
2656
- * @param timeout Waiting period to obtain a value (in milliseconds),
2657
- * or one of the special values K_NO_WAIT and K_FOREVER.
2657
+ * @param timeout Non-negative waiting period to obtain a value (in
2658
+ * milliseconds), or one of the special values K_NO_WAIT and
2659
+ * K_FOREVER.
2658
2660
*
2659
2661
* @retval 0 Element popped from stack.
2660
2662
* @retval -EBUSY Returned without waiting.
2661
2663
* @retval -EAGAIN Waiting period timed out.
2662
2664
* @req K-STACK-001
2663
2665
*/
2664
- __syscall int k_stack_pop (struct k_stack * stack , stack_data_t * data , s32_t timeout );
2666
+ __syscall int k_stack_pop (struct k_stack * stack , stack_data_t * data ,
2667
+ s32_t timeout );
2665
2668
2666
2669
/**
2667
2670
* @brief Statically define and initialize a stack
@@ -2966,7 +2969,8 @@ extern void k_delayed_work_init(struct k_delayed_work *work,
2966
2969
*
2967
2970
* @param work_q Address of workqueue.
2968
2971
* @param work Address of delayed work item.
2969
- * @param delay Delay before submitting the work item (in milliseconds).
2972
+ * @param delay Non-negative delay before submitting the work item (in
2973
+ * milliseconds).
2970
2974
*
2971
2975
* @retval 0 Work item countdown started.
2972
2976
* @retval -EINVAL Work item is being processed or has completed its work.
@@ -3050,7 +3054,8 @@ static inline void k_work_submit(struct k_work *work)
3050
3054
* @note Can be called by ISRs.
3051
3055
*
3052
3056
* @param work Address of delayed work item.
3053
- * @param delay Delay before submitting the work item (in milliseconds).
3057
+ * @param delay Non-negative delay before submitting the work item (in
3058
+ * milliseconds).
3054
3059
*
3055
3060
* @retval 0 Work item countdown started.
3056
3061
* @retval -EINVAL Work item is being processed or has completed its work.
@@ -3120,8 +3125,8 @@ extern void k_work_poll_init(struct k_work_poll *work,
3120
3125
* @param work Address of delayed work item.
3121
3126
* @param events An array of pointers to events which trigger the work.
3122
3127
* @param num_events The number of events in the array.
3123
- * @param timeout Timeout after which the work will be scheduled for
3124
- * execution even if not triggered.
3128
+ * @param timeout Non-negative timeout after which the work will be scheduled
3129
+ * for execution even if not triggered.
3125
3130
*
3126
3131
*
3127
3132
* @retval 0 Work item started watching for events.
@@ -3158,8 +3163,8 @@ extern int k_work_poll_submit_to_queue(struct k_work_q *work_q,
3158
3163
* @param work Address of delayed work item.
3159
3164
* @param events An array of pointers to events which trigger the work.
3160
3165
* @param num_events The number of events in the array.
3161
- * @param timeout Timeout after which the work will be scheduled for
3162
- * execution even if not triggered.
3166
+ * @param timeout Non-negative timeout after which the work will be scheduled
3167
+ * for execution even if not triggered.
3163
3168
*
3164
3169
* @retval 0 Work item started watching for events.
3165
3170
* @retval -EINVAL Work item is being processed or has completed its work.
@@ -3268,8 +3273,9 @@ __syscall void k_mutex_init(struct k_mutex *mutex);
3268
3273
* completes immediately and the lock count is increased by 1.
3269
3274
*
3270
3275
* @param mutex Address of the mutex.
3271
- * @param timeout Waiting period to lock the mutex (in milliseconds),
3272
- * or one of the special values K_NO_WAIT and K_FOREVER.
3276
+ * @param timeout Non-negative waiting period to lock the mutex (in
3277
+ * milliseconds), or one of the special values K_NO_WAIT and
3278
+ * K_FOREVER.
3273
3279
*
3274
3280
* @retval 0 Mutex locked.
3275
3281
* @retval -EBUSY Returned without waiting.
@@ -3356,8 +3362,9 @@ __syscall void k_sem_init(struct k_sem *sem, unsigned int initial_count,
3356
3362
* @note Can be called by ISRs, but @a timeout must be set to K_NO_WAIT.
3357
3363
*
3358
3364
* @param sem Address of the semaphore.
3359
- * @param timeout Waiting period to take the semaphore (in milliseconds),
3360
- * or one of the special values K_NO_WAIT and K_FOREVER.
3365
+ * @param timeout Non-negative waiting period to take the semaphore (in
3366
+ * milliseconds), or one of the special values K_NO_WAIT and
3367
+ * K_FOREVER.
3361
3368
*
3362
3369
* @note When porting code from the nanokernel legacy API to the new API, be
3363
3370
* careful with the return value of this function. The return value is the
@@ -3590,8 +3597,9 @@ void k_msgq_cleanup(struct k_msgq *q);
3590
3597
*
3591
3598
* @param q Address of the message queue.
3592
3599
* @param data Pointer to the message.
3593
- * @param timeout Waiting period to add the message (in milliseconds),
3594
- * or one of the special values K_NO_WAIT and K_FOREVER.
3600
+ * @param timeout Non-negative waiting period to add the message (in
3601
+ * milliseconds), or one of the special values K_NO_WAIT and
3602
+ * K_FOREVER.
3595
3603
*
3596
3604
* @retval 0 Message sent.
3597
3605
* @retval -ENOMSG Returned without waiting or queue purged.
@@ -3610,8 +3618,9 @@ __syscall int k_msgq_put(struct k_msgq *q, void *data, s32_t timeout);
3610
3618
*
3611
3619
* @param q Address of the message queue.
3612
3620
* @param data Address of area to hold the received message.
3613
- * @param timeout Waiting period to receive the message (in milliseconds),
3614
- * or one of the special values K_NO_WAIT and K_FOREVER.
3621
+ * @param timeout Non-negative waiting period to receive the message (in
3622
+ * milliseconds), or one of the special values K_NO_WAIT and
3623
+ * K_FOREVER.
3615
3624
*
3616
3625
* @retval 0 Message received.
3617
3626
* @retval -ENOMSG Returned without waiting.
@@ -3816,7 +3825,7 @@ extern void k_mbox_init(struct k_mbox *mbox);
3816
3825
*
3817
3826
* @param mbox Address of the mailbox.
3818
3827
* @param tx_msg Address of the transmit message descriptor.
3819
- * @param timeout Waiting period for the message to be received (in
3828
+ * @param timeout Non-negative waiting period for the message to be received (in
3820
3829
* milliseconds), or one of the special values K_NO_WAIT
3821
3830
* and K_FOREVER. Once the message has been received,
3822
3831
* this routine waits as long as necessary for the message
@@ -3859,7 +3868,7 @@ extern void k_mbox_async_put(struct k_mbox *mbox, struct k_mbox_msg *tx_msg,
3859
3868
* @param rx_msg Address of the receive message descriptor.
3860
3869
* @param buffer Address of the buffer to receive data, or NULL to defer data
3861
3870
* retrieval and message disposal until later.
3862
- * @param timeout Waiting period for a message to be received (in
3871
+ * @param timeout Non-negative waiting period for a message to be received (in
3863
3872
* milliseconds), or one of the special values K_NO_WAIT
3864
3873
* and K_FOREVER.
3865
3874
*
@@ -3911,8 +3920,8 @@ extern void k_mbox_data_get(struct k_mbox_msg *rx_msg, void *buffer);
3911
3920
* @param rx_msg Address of a receive message descriptor.
3912
3921
* @param pool Address of memory pool, or NULL to discard data.
3913
3922
* @param block Address of the area to hold memory pool block info.
3914
- * @param timeout Waiting period to wait for a memory pool block (in
3915
- * milliseconds), or one of the special values K_NO_WAIT
3923
+ * @param timeout Non-negative waiting period to wait for a memory pool block
3924
+ * (in milliseconds), or one of the special values K_NO_WAIT
3916
3925
* and K_FOREVER.
3917
3926
*
3918
3927
* @retval 0 Data retrieved.
@@ -4053,8 +4062,8 @@ __syscall int k_pipe_alloc_init(struct k_pipe *pipe, size_t size);
4053
4062
* @param bytes_to_write Size of data (in bytes).
4054
4063
* @param bytes_written Address of area to hold the number of bytes written.
4055
4064
* @param min_xfer Minimum number of bytes to write.
4056
- * @param timeout Waiting period to wait for the data to be written (in
4057
- * milliseconds), or one of the special values K_NO_WAIT
4065
+ * @param timeout Non-negative waiting period to wait for the data to be written
4066
+ * (in milliseconds), or one of the special values K_NO_WAIT
4058
4067
* and K_FOREVER.
4059
4068
*
4060
4069
* @retval 0 At least @a min_xfer bytes of data were written.
@@ -4077,8 +4086,8 @@ __syscall int k_pipe_put(struct k_pipe *pipe, void *data,
4077
4086
* @param bytes_to_read Maximum number of data bytes to read.
4078
4087
* @param bytes_read Address of area to hold the number of bytes read.
4079
4088
* @param min_xfer Minimum number of data bytes to read.
4080
- * @param timeout Waiting period to wait for the data to be read (in
4081
- * milliseconds), or one of the special values K_NO_WAIT
4089
+ * @param timeout Non-negative waiting period to wait for the data to be read
4090
+ * (in milliseconds), or one of the special values K_NO_WAIT
4082
4091
* and K_FOREVER.
4083
4092
*
4084
4093
* @retval 0 At least @a min_xfer bytes of data were read.
@@ -4208,7 +4217,7 @@ extern void k_mem_slab_init(struct k_mem_slab *slab, void *buffer,
4208
4217
*
4209
4218
* @param slab Address of the memory slab.
4210
4219
* @param mem Pointer to block address area.
4211
- * @param timeout Maximum time to wait for operation to complete
4220
+ * @param timeout Non-negative waiting period to wait for operation to complete
4212
4221
* (in milliseconds). Use K_NO_WAIT to return without waiting,
4213
4222
* or K_FOREVER to wait as long as necessary.
4214
4223
*
@@ -4331,7 +4340,7 @@ struct k_mem_pool {
4331
4340
* @param pool Address of the memory pool.
4332
4341
* @param block Pointer to block descriptor for the allocated memory.
4333
4342
* @param size Amount of memory to allocate (in bytes).
4334
- * @param timeout Maximum time to wait for operation to complete
4343
+ * @param timeout Non-negative waiting period to wait for operation to complete
4335
4344
* (in milliseconds). Use K_NO_WAIT to return without waiting,
4336
4345
* or K_FOREVER to wait as long as necessary.
4337
4346
*
@@ -4653,8 +4662,9 @@ extern void k_poll_event_init(struct k_poll_event *event, u32_t type,
4653
4662
*
4654
4663
* @param events An array of pointers to events to be polled for.
4655
4664
* @param num_events The number of events in the array.
4656
- * @param timeout Waiting period for an event to be ready (in milliseconds),
4657
- * or one of the special values K_NO_WAIT and K_FOREVER.
4665
+ * @param timeout Non-negative waiting period for an event to be ready (in
4666
+ * milliseconds), or one of the special values K_NO_WAIT and
4667
+ * K_FOREVER.
4658
4668
*
4659
4669
* @retval 0 One or more events are ready.
4660
4670
* @retval -EAGAIN Waiting period timed out.
0 commit comments