Skip to content

Commit ea7be7c

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 a5bb524 commit ea7be7c

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
*/
@@ -82,7 +82,7 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
8282
osMessageQueueDelete(_id);
8383
}
8484

85-
/** Check if the queue is empty
85+
/** Check if the queue is empty.
8686
*
8787
* @return True if the queue is empty, false if not
8888
*
@@ -92,7 +92,7 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
9292
return osMessageQueueGetCount(_id) == 0;
9393
}
9494

95-
/** Check if the queue is full
95+
/** Check if the queue is full.
9696
*
9797
* @return True if the queue is full, false if not
9898
*
@@ -109,19 +109,19 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
109109
* (higher numbers indicate higher priority) on insertion.
110110
*
111111
* The timeout indicated by the parameter `millisec` specifies how long the
112-
* function will block waiting for the message to be inserted into the
112+
* function blocks waiting for the message to be inserted into the
113113
* queue.
114114
*
115115
* The parameter `millisec` can have the following values:
116116
* - When the timeout is 0 (the default), the function returns instantly.
117-
* - When the timeout is osWaitForever the function will wait for an
117+
* - When the timeout is osWaitForever, the function waits for an
118118
* infinite time.
119-
* - For all other values the function will wait for the given number of
119+
* - For all other values, the function waits for the given number of
120120
* milliseconds.
121121
*
122122
* @param data Pointer to the element to insert into the queue.
123123
* @param millisec Timeout for the operation to be executed, or 0 in case
124-
* of no-timeout. (default: 0)
124+
* of no timeout. (default: 0)
125125
* @param prio Priority of the operation or 0 in case of default.
126126
* (default: 0)
127127
*
@@ -132,7 +132,7 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
132132
* queue in the given time.
133133
* @a osErrorResource The message could not be inserted because
134134
* the queue is full.
135-
* @a osErrorParameter Internal error or non-zero timeout specified
135+
* @a osErrorParameter Internal error or nonzero timeout specified
136136
* in an ISR.
137137
*
138138
* @note You may call this function from ISR context if the millisec
@@ -149,17 +149,17 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
149149
* in the value field of the returned `osEvent` object.
150150
*
151151
* The timeout specified by the parameter `millisec` specifies how long the
152-
* function will wait to retrieve the message from the queue.
152+
* function waits to retrieve the message from the queue.
153153
*
154154
* The timeout parameter can have the following values:
155155
* - When the timeout is 0, the function returns instantly.
156-
* - When the timeout is osWaitForever (default), the function will wait
156+
* - When the timeout is osWaitForever (default), the function waits
157157
* infinite time until the message is retrieved.
158-
* - When the timeout is any other value the function will wait for th
158+
* - When the timeout is any other value, the function waits for the
159159
* specified time before returning a timeout error.
160160
*
161161
* Messages are retrieved in descending priority order. If two messages
162-
* share the same priority level they are retrieved in first-in, first-out
162+
* share the same priority level, they are retrieved in first-in, first-out
163163
* (FIFO) order.
164164
*
165165
* @param millisec Timeout value or 0 in case of no time-out.
@@ -168,7 +168,7 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
168168
* @return Event information that includes the message in event. Message
169169
* value and the status code in event.status:
170170
* @a osEventMessage Message successfully received.
171-
* @a osOK No message is available in the queue and no
171+
* @a osOK No message is available in the queue, and no
172172
* timeout was specified.
173173
* @a osEventTimeout No message was received before a timeout
174174
* event occurred.

0 commit comments

Comments
 (0)