|
352 | 352 | #define portCRITICAL_NESTING_IN_TCB 0 |
353 | 353 | #endif |
354 | 354 |
|
| 355 | +#ifndef portUSING_GRANULAR_LOCKS |
| 356 | + #define portUSING_GRANULAR_LOCKS 0 |
| 357 | +#endif |
| 358 | + |
355 | 359 | #ifndef configMAX_TASK_NAME_LEN |
356 | 360 | #define configMAX_TASK_NAME_LEN 16 |
357 | 361 | #endif |
|
444 | 448 |
|
445 | 449 | #ifndef portRELEASE_TASK_LOCK |
446 | 450 |
|
447 | | - #if ( configNUMBER_OF_CORES == 1 ) |
| 451 | + #if ( ( portUSING_GRANULAR_LOCKS == 1 ) || ( configNUMBER_OF_CORES == 1 ) ) |
448 | 452 | #define portRELEASE_TASK_LOCK() |
449 | 453 | #else |
450 | 454 | #error portRELEASE_TASK_LOCK is required in SMP |
|
454 | 458 |
|
455 | 459 | #ifndef portGET_TASK_LOCK |
456 | 460 |
|
457 | | - #if ( configNUMBER_OF_CORES == 1 ) |
| 461 | + #if ( ( portUSING_GRANULAR_LOCKS == 1 ) || ( configNUMBER_OF_CORES == 1 ) ) |
458 | 462 | #define portGET_TASK_LOCK() |
459 | 463 | #else |
460 | 464 | #error portGET_TASK_LOCK is required in SMP |
|
464 | 468 |
|
465 | 469 | #ifndef portRELEASE_ISR_LOCK |
466 | 470 |
|
467 | | - #if ( configNUMBER_OF_CORES == 1 ) |
| 471 | + #if ( ( portUSING_GRANULAR_LOCKS == 1 ) || ( configNUMBER_OF_CORES == 1 ) ) |
468 | 472 | #define portRELEASE_ISR_LOCK() |
469 | 473 | #else |
470 | 474 | #error portRELEASE_ISR_LOCK is required in SMP |
|
474 | 478 |
|
475 | 479 | #ifndef portGET_ISR_LOCK |
476 | 480 |
|
477 | | - #if ( configNUMBER_OF_CORES == 1 ) |
| 481 | + #if ( ( portUSING_GRANULAR_LOCKS == 1 ) || ( configNUMBER_OF_CORES == 1 ) ) |
478 | 482 | #define portGET_ISR_LOCK() |
479 | 483 | #else |
480 | 484 | #error portGET_ISR_LOCK is required in SMP |
481 | 485 | #endif |
482 | 486 |
|
483 | 487 | #endif /* portGET_ISR_LOCK */ |
484 | 488 |
|
| 489 | +#ifndef portRELEASE_SPINLOCK |
| 490 | + |
| 491 | + #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) |
| 492 | + #error portRELEASE_SPINLOCK is required for granular locking |
| 493 | + #endif |
| 494 | + |
| 495 | +#endif |
| 496 | + |
| 497 | +#ifndef portGET_SPINLOCK |
| 498 | + |
| 499 | + #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) |
| 500 | + #error portGET_SPINLOCK is required for granular locking |
| 501 | + #endif |
| 502 | + |
| 503 | +#endif |
| 504 | + |
| 505 | +#ifndef portCHECK_IF_IN_ISR |
| 506 | + |
| 507 | + #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) |
| 508 | + #error portCHECK_IF_IN_ISR is required for granular locking |
| 509 | + #endif |
| 510 | + |
| 511 | +#endif |
| 512 | + |
485 | 513 | #ifndef portENTER_CRITICAL_FROM_ISR |
486 | 514 |
|
487 | 515 | #if ( configNUMBER_OF_CORES > 1 ) |
|
498 | 526 |
|
499 | 527 | #endif |
500 | 528 |
|
| 529 | +#ifndef portLOCK_DATA_GROUP |
| 530 | + |
| 531 | + #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) |
| 532 | + #error portLOCK_DATA_GROUP is required for granular locking |
| 533 | + #endif |
| 534 | + |
| 535 | +#endif |
| 536 | + |
| 537 | +#ifndef portUNLOCK_DATA_GROUP |
| 538 | + |
| 539 | + #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) |
| 540 | + #error portUNLOCK_DATA_GROUP is required for granular locking |
| 541 | + #endif |
| 542 | + |
| 543 | +#endif |
| 544 | + |
| 545 | +#ifndef portLOCK_DATA_GROUP_FROM_ISR |
| 546 | + |
| 547 | + #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) |
| 548 | + #error portLOCK_DATA_GROUP_FROM_ISR is required for granular locking |
| 549 | + #endif |
| 550 | + |
| 551 | +#endif |
| 552 | + |
| 553 | +#ifndef portUNLOCK_DATA_GROUP_FROM_ISR |
| 554 | + |
| 555 | + #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) |
| 556 | + #error portUNLOCK_DATA_GROUP_FROM_ISR is required for granular locking |
| 557 | + #endif |
| 558 | + |
| 559 | +#endif |
| 560 | + |
| 561 | +#ifndef portSPINLOCK_TYPE |
| 562 | + |
| 563 | + #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) |
| 564 | + #error portSPINLOCK_TYPE is required for granular locking |
| 565 | + #endif |
| 566 | + |
| 567 | +#endif |
| 568 | + |
| 569 | +#ifndef portINIT_EVENT_GROUP_TASK_SPINLOCK |
| 570 | + |
| 571 | + #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) |
| 572 | + #error portINIT_EVENT_GROUP_TASK_SPINLOCK is required for granular locking |
| 573 | + #endif |
| 574 | + |
| 575 | +#endif |
| 576 | + |
| 577 | +#ifndef portINIT_EVENT_GROUP_ISR_SPINLOCK |
| 578 | + |
| 579 | + #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) |
| 580 | + #error portINIT_EVENT_GROUP_ISR_SPINLOCK is required for granular locking |
| 581 | + #endif |
| 582 | + |
| 583 | +#endif |
| 584 | + |
| 585 | +#ifndef portINIT_QUEUE_TASK_SPINLOCK |
| 586 | + |
| 587 | + #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) |
| 588 | + #error portINIT_QUEUE_TASK_SPINLOCK is required for granular locking |
| 589 | + #endif |
| 590 | + |
| 591 | +#endif |
| 592 | + |
| 593 | +#ifndef portINIT_QUEUE_ISR_SPINLOCK |
| 594 | + |
| 595 | + #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) |
| 596 | + #error portINIT_QUEUE_ISR_SPINLOCK is required for granular locking |
| 597 | + #endif |
| 598 | + |
| 599 | +#endif |
| 600 | + |
| 601 | +#ifndef portINIT_STREAM_BUFFER_TASK_SPINLOCK |
| 602 | + |
| 603 | + #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) |
| 604 | + #error portINIT_STREAM_BUFFER_TASK_SPINLOCK is required for granular locking |
| 605 | + #endif |
| 606 | + |
| 607 | +#endif |
| 608 | + |
| 609 | +#ifndef portINIT_STREAM_BUFFER_ISR_SPINLOCK |
| 610 | + |
| 611 | + #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) |
| 612 | + #error portINIT_STREAM_BUFFER_ISR_SPINLOCK is required for granular locking |
| 613 | + #endif |
| 614 | + |
| 615 | +#endif |
| 616 | + |
| 617 | +#ifndef portINIT_KERNEL_TASK_SPINLOCK_STATIC |
| 618 | + |
| 619 | + #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) |
| 620 | + #error portINIT_KERNEL_TASK_SPINLOCK_STATIC is required for granular locking |
| 621 | + #endif |
| 622 | + |
| 623 | +#endif |
| 624 | + |
| 625 | +#ifndef portINIT_KERNEL_ISR_SPINLOCK_STATIC |
| 626 | + |
| 627 | + #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) |
| 628 | + #error portINIT_KERNEL_ISR_SPINLOCK_STATIC is required for granular locking |
| 629 | + #endif |
| 630 | + |
| 631 | +#endif |
| 632 | + |
| 633 | +#ifndef portINIT_TIMERS_TASK_SPINLOCK_STATIC |
| 634 | + |
| 635 | + #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) |
| 636 | + #error portINIT_TIMERS_TASK_SPINLOCK_STATIC is required for granular locking |
| 637 | + #endif |
| 638 | + |
| 639 | +#endif |
| 640 | + |
| 641 | +#ifndef portINIT_TIMERS_ISR_SPINLOCK_STATIC |
| 642 | + |
| 643 | + #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) |
| 644 | + #error portINIT_TIMERS_ISR_SPINLOCK_STATIC is required for granular locking |
| 645 | + #endif |
| 646 | + |
| 647 | +#endif |
| 648 | + |
501 | 649 | #ifndef configUSE_CORE_AFFINITY |
502 | 650 | #define configUSE_CORE_AFFINITY 0 |
503 | 651 | #endif /* configUSE_CORE_AFFINITY */ |
|
0 commit comments