mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
tools/nxstyle.c: Add logic to detect if there is a blank line following the final right brace. sched/: Applied the modified nxstyle to all C file as a test.
This commit is contained in:
@@ -676,7 +676,6 @@ static int nxsem_restoreholderprioB(FAR struct semholder_s *pholder,
|
||||
|
||||
if (pholder->htcb == rtcb)
|
||||
{
|
||||
|
||||
/* The running task has given up a count on the semaphore */
|
||||
|
||||
#if CONFIG_SEM_PREALLOCHOLDERS == 0
|
||||
|
||||
@@ -96,6 +96,7 @@ int nxsem_setprotocol(FAR sem_t *sem, int protocol)
|
||||
switch (protocol)
|
||||
{
|
||||
case SEM_PRIO_NONE:
|
||||
|
||||
/* Disable priority inheritance */
|
||||
|
||||
sem->flags |= PRIOINHERIT_FLAGS_DISABLE;
|
||||
@@ -106,12 +107,14 @@ int nxsem_setprotocol(FAR sem_t *sem, int protocol)
|
||||
return OK;
|
||||
|
||||
case SEM_PRIO_INHERIT:
|
||||
|
||||
/* Enable priority inheritance (dangerous) */
|
||||
|
||||
sem->flags &= ~PRIOINHERIT_FLAGS_DISABLE;
|
||||
return OK;
|
||||
|
||||
case SEM_PRIO_PROTECT:
|
||||
|
||||
/* Not yet supported */
|
||||
|
||||
return -ENOSYS;
|
||||
|
||||
Reference in New Issue
Block a user