mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Add recursive mutexes to PC demo.
This commit is contained in:
parent
354a57ed5e
commit
2ee98beba2
|
@ -64,6 +64,7 @@
|
||||||
#define configUSE_MUTEXES 1
|
#define configUSE_MUTEXES 1
|
||||||
#define configUSE_COUNTING_SEMAPHORES 1
|
#define configUSE_COUNTING_SEMAPHORES 1
|
||||||
#define configUSE_ALTERNATIVE_API 1
|
#define configUSE_ALTERNATIVE_API 1
|
||||||
|
#define configUSE_RECURSIVE_MUTEXES 1
|
||||||
|
|
||||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 10 )
|
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 10 )
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
||||||
|
|
|
@ -95,6 +95,7 @@
|
||||||
#include "AltQTest.h"
|
#include "AltQTest.h"
|
||||||
#include "AltPollQ.h"
|
#include "AltPollQ.h"
|
||||||
#include "AltBlckQ.h"
|
#include "AltBlckQ.h"
|
||||||
|
#include "RecMutex.h"
|
||||||
|
|
||||||
/* Priority definitions for the tasks in the demo application. */
|
/* Priority definitions for the tasks in the demo application. */
|
||||||
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||||
|
@ -163,6 +164,7 @@ portSHORT main( void )
|
||||||
vCreateAltBlockTimeTasks();
|
vCreateAltBlockTimeTasks();
|
||||||
vStartAltBlockingQueueTasks( mainQUEUE_BLOCK_PRIORITY );
|
vStartAltBlockingQueueTasks( mainQUEUE_BLOCK_PRIORITY );
|
||||||
vStartAltPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
vStartAltPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
||||||
|
vStartRecursiveMutexTasks();
|
||||||
|
|
||||||
/* Create the "Print" task as described at the top of the file. */
|
/* Create the "Print" task as described at the top of the file. */
|
||||||
xTaskCreate( vErrorChecks, "Print", mainPRINT_STACK_SIZE, NULL, mainPRINT_TASK_PRIORITY, NULL );
|
xTaskCreate( vErrorChecks, "Print", mainPRINT_STACK_SIZE, NULL, mainPRINT_TASK_PRIORITY, NULL );
|
||||||
|
@ -416,6 +418,12 @@ static portSHORT sErrorHasOccurred = pdFALSE;
|
||||||
sErrorHasOccurred = pdTRUE;
|
sErrorHasOccurred = pdTRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
vDisplayMessage( "Error in recursive mutex tasks!\r\n" );
|
||||||
|
sErrorHasOccurred = pdTRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if( sErrorHasOccurred == pdFALSE )
|
if( sErrorHasOccurred == pdFALSE )
|
||||||
{
|
{
|
||||||
vDisplayMessage( "OK " );
|
vDisplayMessage( "OK " );
|
||||||
|
|
|
@ -75,7 +75,7 @@ WVList
|
||||||
0
|
0
|
||||||
19
|
19
|
||||||
WPickList
|
WPickList
|
||||||
63
|
64
|
||||||
20
|
20
|
||||||
MItem
|
MItem
|
||||||
3
|
3
|
||||||
|
@ -886,8 +886,8 @@ WVList
|
||||||
0
|
0
|
||||||
208
|
208
|
||||||
MItem
|
MItem
|
||||||
15
|
28
|
||||||
fileio\fileio.c
|
..\COMMON\MINIMAL\recmutex.c
|
||||||
209
|
209
|
||||||
WString
|
WString
|
||||||
4
|
4
|
||||||
|
@ -904,8 +904,8 @@ WVList
|
||||||
0
|
0
|
||||||
212
|
212
|
||||||
MItem
|
MItem
|
||||||
6
|
15
|
||||||
main.c
|
fileio\fileio.c
|
||||||
213
|
213
|
||||||
WString
|
WString
|
||||||
4
|
4
|
||||||
|
@ -922,8 +922,8 @@ WVList
|
||||||
0
|
0
|
||||||
216
|
216
|
||||||
MItem
|
MItem
|
||||||
17
|
6
|
||||||
partest\partest.c
|
main.c
|
||||||
217
|
217
|
||||||
WString
|
WString
|
||||||
4
|
4
|
||||||
|
@ -940,8 +940,8 @@ WVList
|
||||||
0
|
0
|
||||||
220
|
220
|
||||||
MItem
|
MItem
|
||||||
15
|
17
|
||||||
serial\serial.c
|
partest\partest.c
|
||||||
221
|
221
|
||||||
WString
|
WString
|
||||||
4
|
4
|
||||||
|
@ -958,26 +958,26 @@ WVList
|
||||||
0
|
0
|
||||||
224
|
224
|
||||||
MItem
|
MItem
|
||||||
3
|
15
|
||||||
*.h
|
serial\serial.c
|
||||||
225
|
225
|
||||||
WString
|
WString
|
||||||
3
|
4
|
||||||
NIL
|
COBJ
|
||||||
226
|
226
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
227
|
227
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
-1
|
20
|
||||||
|
1
|
||||||
1
|
1
|
||||||
0
|
|
||||||
0
|
0
|
||||||
228
|
228
|
||||||
MItem
|
MItem
|
||||||
31
|
3
|
||||||
..\..\SOURCE\INCLUDE\croutine.h
|
*.h
|
||||||
229
|
229
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -988,14 +988,14 @@ WVList
|
||||||
231
|
231
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
-1
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
232
|
232
|
||||||
MItem
|
MItem
|
||||||
27
|
31
|
||||||
..\..\source\include\list.h
|
..\..\SOURCE\INCLUDE\croutine.h
|
||||||
233
|
233
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1006,14 +1006,14 @@ WVList
|
||||||
235
|
235
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
236
|
236
|
||||||
MItem
|
MItem
|
||||||
31
|
27
|
||||||
..\..\source\include\portable.h
|
..\..\source\include\list.h
|
||||||
237
|
237
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1024,14 +1024,14 @@ WVList
|
||||||
239
|
239
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
240
|
240
|
||||||
MItem
|
MItem
|
||||||
31
|
31
|
||||||
..\..\source\include\projdefs.h
|
..\..\source\include\portable.h
|
||||||
241
|
241
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1042,14 +1042,14 @@ WVList
|
||||||
243
|
243
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
244
|
244
|
||||||
MItem
|
MItem
|
||||||
28
|
31
|
||||||
..\..\source\include\queue.h
|
..\..\source\include\projdefs.h
|
||||||
245
|
245
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1060,14 +1060,14 @@ WVList
|
||||||
247
|
247
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
248
|
248
|
||||||
MItem
|
MItem
|
||||||
29
|
28
|
||||||
..\..\source\include\semphr.h
|
..\..\source\include\queue.h
|
||||||
249
|
249
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1078,14 +1078,14 @@ WVList
|
||||||
251
|
251
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
252
|
252
|
||||||
MItem
|
MItem
|
||||||
27
|
29
|
||||||
..\..\source\include\task.h
|
..\..\source\include\semphr.h
|
||||||
253
|
253
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1096,14 +1096,14 @@ WVList
|
||||||
255
|
255
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
256
|
256
|
||||||
MItem
|
MItem
|
||||||
55
|
27
|
||||||
..\..\source\portable\owatcom\16bitdos\common\portasm.h
|
..\..\source\include\task.h
|
||||||
257
|
257
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1114,14 +1114,14 @@ WVList
|
||||||
259
|
259
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
260
|
260
|
||||||
MItem
|
MItem
|
||||||
53
|
55
|
||||||
..\..\source\portable\owatcom\16bitdos\pc\portmacro.h
|
..\..\source\portable\owatcom\16bitdos\common\portasm.h
|
||||||
261
|
261
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1132,14 +1132,14 @@ WVList
|
||||||
263
|
263
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
264
|
264
|
||||||
MItem
|
MItem
|
||||||
28
|
53
|
||||||
..\COMMON\INCLUDE\AltBlckQ.h
|
..\..\source\portable\owatcom\16bitdos\pc\portmacro.h
|
||||||
265
|
265
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1150,14 +1150,14 @@ WVList
|
||||||
267
|
267
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
268
|
268
|
||||||
MItem
|
MItem
|
||||||
28
|
28
|
||||||
..\COMMON\INCLUDE\AltBlock.h
|
..\COMMON\INCLUDE\AltBlckQ.h
|
||||||
269
|
269
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1168,14 +1168,14 @@ WVList
|
||||||
271
|
271
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
272
|
272
|
||||||
MItem
|
MItem
|
||||||
28
|
28
|
||||||
..\COMMON\INCLUDE\AltPollQ.h
|
..\COMMON\INCLUDE\AltBlock.h
|
||||||
273
|
273
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1186,14 +1186,14 @@ WVList
|
||||||
275
|
275
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
276
|
276
|
||||||
MItem
|
MItem
|
||||||
28
|
28
|
||||||
..\COMMON\INCLUDE\AltQTest.h
|
..\COMMON\INCLUDE\AltPollQ.h
|
||||||
277
|
277
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1204,14 +1204,14 @@ WVList
|
||||||
279
|
279
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
280
|
280
|
||||||
MItem
|
MItem
|
||||||
26
|
28
|
||||||
..\common\include\blockq.h
|
..\COMMON\INCLUDE\AltQTest.h
|
||||||
281
|
281
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1222,14 +1222,14 @@ WVList
|
||||||
283
|
283
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
284
|
284
|
||||||
MItem
|
MItem
|
||||||
28
|
26
|
||||||
..\COMMON\INCLUDE\blocktim.h
|
..\common\include\blockq.h
|
||||||
285
|
285
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1240,14 +1240,14 @@ WVList
|
||||||
287
|
287
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
288
|
288
|
||||||
MItem
|
MItem
|
||||||
27
|
28
|
||||||
..\common\include\comtest.h
|
..\COMMON\INCLUDE\blocktim.h
|
||||||
289
|
289
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1258,14 +1258,14 @@ WVList
|
||||||
291
|
291
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
292
|
292
|
||||||
MItem
|
MItem
|
||||||
28
|
27
|
||||||
..\COMMON\INCLUDE\countsem.h
|
..\common\include\comtest.h
|
||||||
293
|
293
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1276,14 +1276,14 @@ WVList
|
||||||
295
|
295
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
296
|
296
|
||||||
MItem
|
MItem
|
||||||
26
|
28
|
||||||
..\COMMON\INCLUDE\crhook.h
|
..\COMMON\INCLUDE\countsem.h
|
||||||
297
|
297
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1294,14 +1294,14 @@ WVList
|
||||||
299
|
299
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
300
|
300
|
||||||
MItem
|
MItem
|
||||||
25
|
26
|
||||||
..\common\include\death.h
|
..\COMMON\INCLUDE\crhook.h
|
||||||
301
|
301
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1312,14 +1312,14 @@ WVList
|
||||||
303
|
303
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
304
|
304
|
||||||
MItem
|
MItem
|
||||||
27
|
25
|
||||||
..\COMMON\INCLUDE\dynamic.h
|
..\common\include\death.h
|
||||||
305
|
305
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1330,14 +1330,14 @@ WVList
|
||||||
307
|
307
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
308
|
308
|
||||||
MItem
|
MItem
|
||||||
26
|
27
|
||||||
..\common\include\fileio.h
|
..\COMMON\INCLUDE\dynamic.h
|
||||||
309
|
309
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1348,14 +1348,14 @@ WVList
|
||||||
311
|
311
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
312
|
312
|
||||||
MItem
|
MItem
|
||||||
25
|
26
|
||||||
..\common\include\flash.h
|
..\common\include\fileio.h
|
||||||
313
|
313
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1366,14 +1366,14 @@ WVList
|
||||||
315
|
315
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
316
|
316
|
||||||
MItem
|
MItem
|
||||||
24
|
25
|
||||||
..\common\include\flop.h
|
..\common\include\flash.h
|
||||||
317
|
317
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1384,14 +1384,14 @@ WVList
|
||||||
319
|
319
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
320
|
320
|
||||||
MItem
|
MItem
|
||||||
28
|
24
|
||||||
..\COMMON\INCLUDE\GenQTest.h
|
..\common\include\flop.h
|
||||||
321
|
321
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1402,14 +1402,14 @@ WVList
|
||||||
323
|
323
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
324
|
324
|
||||||
MItem
|
MItem
|
||||||
27
|
28
|
||||||
..\common\include\partest.h
|
..\COMMON\INCLUDE\GenQTest.h
|
||||||
325
|
325
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1420,14 +1420,14 @@ WVList
|
||||||
327
|
327
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
328
|
328
|
||||||
MItem
|
MItem
|
||||||
25
|
27
|
||||||
..\common\include\pollq.h
|
..\common\include\partest.h
|
||||||
329
|
329
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1438,14 +1438,14 @@ WVList
|
||||||
331
|
331
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
332
|
332
|
||||||
MItem
|
MItem
|
||||||
25
|
25
|
||||||
..\common\include\print.h
|
..\common\include\pollq.h
|
||||||
333
|
333
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1456,14 +1456,14 @@ WVList
|
||||||
335
|
335
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
336
|
336
|
||||||
MItem
|
MItem
|
||||||
27
|
25
|
||||||
..\common\include\semtest.h
|
..\common\include\print.h
|
||||||
337
|
337
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1474,14 +1474,14 @@ WVList
|
||||||
339
|
339
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
340
|
340
|
||||||
MItem
|
MItem
|
||||||
26
|
27
|
||||||
..\common\include\serial.h
|
..\common\include\semtest.h
|
||||||
341
|
341
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1492,14 +1492,14 @@ WVList
|
||||||
343
|
343
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
344
|
344
|
||||||
MItem
|
MItem
|
||||||
16
|
26
|
||||||
FreeRTOSConfig.h
|
..\common\include\serial.h
|
||||||
345
|
345
|
||||||
WString
|
WString
|
||||||
3
|
3
|
||||||
|
@ -1510,7 +1510,25 @@ WVList
|
||||||
347
|
347
|
||||||
WVList
|
WVList
|
||||||
0
|
0
|
||||||
224
|
228
|
||||||
|
1
|
||||||
|
1
|
||||||
|
0
|
||||||
|
348
|
||||||
|
MItem
|
||||||
|
16
|
||||||
|
FreeRTOSConfig.h
|
||||||
|
349
|
||||||
|
WString
|
||||||
|
3
|
||||||
|
NIL
|
||||||
|
350
|
||||||
|
WVList
|
||||||
|
0
|
||||||
|
351
|
||||||
|
WVList
|
||||||
|
0
|
||||||
|
228
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
0
|
0
|
||||||
|
|
|
@ -6,7 +6,7 @@ VpeMain
|
||||||
WRect
|
WRect
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
6209
|
6202
|
||||||
7168
|
7168
|
||||||
2
|
2
|
||||||
MProject
|
MProject
|
||||||
|
@ -38,6 +38,6 @@ WRect
|
||||||
WFileName
|
WFileName
|
||||||
12
|
12
|
||||||
rtosdemo.tgt
|
rtosdemo.tgt
|
||||||
0
|
6
|
||||||
0
|
63
|
||||||
7
|
7
|
||||||
|
|
Loading…
Reference in a new issue