Skip to content

Commit fbc5a38

Browse files
Amanda ButlerCruz Monrreal II
authored andcommitted
Edit Queue.h
Edit file, including existing text, mostly for active voice and consistent tense.
1 parent 7e8a932 commit fbc5a38

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

rtos/Queue.h

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,19 @@ namespace rtos {
3939
/** The Queue class represents a collection of objects that are stored first by
4040
* order of priorty, and then in first-in, first-out (FIFO) order.
4141
*
42-
* A queue is used to when data needs to stored and then accessed in the same
43-
* order that it has been stored. The order in which they are retrieved is in
44-
* order of descending priority, if multiple elements have the same priority
42+
* You can use a queue when you need to store data and then access it in the same
43+
* order that it has been stored. The order in which you retrieve the data is in
44+
* order of descending priority. If multiple elements have the same priority,
4545
* they are retrieved in FIFO order.
4646
*
47-
* The object type stored in the queue can be an integer, pointer, or a generic
47+
* The object type stored in the queue can be an integer, pointer or a generic
4848
* type given by the template parameter T.
4949
*
50-
* @tparam T Specifies the type of elements that are stored in the queue.
51-
* @tparam queue_sz Maximum number of messages that can be stored in the queue.
50+
* @tparam T Specifies the type of elements stored in the queue.
51+
* @tparam queue_sz Maximum number of messages that you can store in the queue.
5252
*
53-
* @note Memory considerations: The queue control structures will be created on
54-
* current thread's stack, both for the mbed OS and underlying RTOS
53+
* @note Memory considerations: The queue control structures are created on the
54+
* current thread's stack, both for the Mbed OS and underlying RTOS
5555
* objects (static or dynamic RTOS memory pools are not being used).
5656
*
5757
*/
@@ -84,7 +84,7 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
8484
osMessageQueueDelete(_id);
8585
}
8686

87-
/** Check if the queue is empty
87+
/** Check if the queue is empty.
8888
*
8989
* @return True if the queue is empty, false if not
9090
*
@@ -95,7 +95,7 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
9595
return osMessageQueueGetCount(_id) == 0;
9696
}
9797

98-
/** Check if the queue is full
98+
/** Check if the queue is full.
9999
*
100100
* @return True if the queue is full, false if not
101101
*
@@ -113,19 +113,19 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
113113
* (higher numbers indicate higher priority) on insertion.
114114
*
115115
* The timeout indicated by the parameter `millisec` specifies how long the
116-
* function will block waiting for the message to be inserted into the
116+
* function blocks waiting for the message to be inserted into the
117117
* queue.
118118
*
119119
* The parameter `millisec` can have the following values:
120120
* - When the timeout is 0 (the default), the function returns instantly.
121-
* - When the timeout is osWaitForever the function will wait for an
121+
* - When the timeout is osWaitForever, the function waits for an
122122
* infinite time.
123-
* - For all other values the function will wait for the given number of
123+
* - For all other values, the function waits for the given number of
124124
* milliseconds.
125125
*
126126
* @param data Pointer to the element to insert into the queue.
127127
* @param millisec Timeout for the operation to be executed, or 0 in case
128-
* of no-timeout. (default: 0)
128+
* of no timeout. (default: 0)
129129
* @param prio Priority of the operation or 0 in case of default.
130130
* (default: 0)
131131
*
@@ -136,7 +136,7 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
136136
* queue in the given time.
137137
* @a osErrorResource The message could not be inserted because
138138
* the queue is full.
139-
* @a osErrorParameter Internal error or non-zero timeout specified
139+
* @a osErrorParameter Internal error or nonzero timeout specified
140140
* in an ISR.
141141
*
142142
* @note You may call this function from ISR context if the millisec
@@ -153,17 +153,17 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
153153
* in the value field of the returned `osEvent` object.
154154
*
155155
* The timeout specified by the parameter `millisec` specifies how long the
156-
* function will wait to retrieve the message from the queue.
156+
* function waits to retrieve the message from the queue.
157157
*
158158
* The timeout parameter can have the following values:
159159
* - When the timeout is 0, the function returns instantly.
160-
* - When the timeout is osWaitForever (default), the function will wait
160+
* - When the timeout is osWaitForever (default), the function waits
161161
* infinite time until the message is retrieved.
162-
* - When the timeout is any other value the function will wait for th
162+
* - When the timeout is any other value, the function waits for the
163163
* specified time before returning a timeout error.
164164
*
165165
* Messages are retrieved in descending priority order. If two messages
166-
* share the same priority level they are retrieved in first-in, first-out
166+
* share the same priority level, they are retrieved in first-in, first-out
167167
* (FIFO) order.
168168
*
169169
* @param millisec Timeout value or 0 in case of no time-out.
@@ -172,7 +172,7 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
172172
* @return Event information that includes the message in event. Message
173173
* value and the status code in event.status:
174174
* @a osEventMessage Message successfully received.
175-
* @a osOK No message is available in the queue and no
175+
* @a osOK No message is available in the queue, and no
176176
* timeout was specified.
177177
* @a osEventTimeout No message was received before a timeout
178178
* event occurred.

0 commit comments

Comments
 (0)