mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 07:03:34 +08:00
Merge with trunk NuttX
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5079 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -202,6 +202,14 @@ config SCHED_ONEXIT_MAX
|
||||
is supported. That number can be increased by defined this setting to the
|
||||
number that you require.
|
||||
|
||||
config USER_ENTRYPOINT
|
||||
string "Appliation entry point"
|
||||
default "user_start"
|
||||
---help---
|
||||
The name of the entry point for user applications. For the example
|
||||
applications this is of the form 'app_main' where 'app' is the application
|
||||
name. If not defined, USER_ENTRYPOINT defaults to "user_start."
|
||||
|
||||
config DISABLE_OS_API
|
||||
bool "Disable NuttX interfaces"
|
||||
default y
|
||||
|
||||
@@ -71,12 +71,6 @@
|
||||
* then the default entry point is user_start.
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_NUTTX_KERNEL) && defined(CONFIG_USER_ENTRYPOINT)
|
||||
# define USER_ENTRYPOINT (main_t)CONFIG_USER_ENTRYPOINT
|
||||
#else
|
||||
# define USER_ENTRYPOINT user_start
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
@@ -175,11 +169,11 @@ int os_bringup(void)
|
||||
|
||||
init_taskid = exec_namedapp(CONFIG_BUILTIN_APP_START, argv);
|
||||
#else
|
||||
/* Start the default application at USER_ENTRYPOINT() */
|
||||
/* Start the default application at CONFIG_USER_ENTRYPOINT() */
|
||||
|
||||
init_taskid = TASK_CREATE("init", SCHED_PRIORITY_DEFAULT,
|
||||
CONFIG_USERMAIN_STACKSIZE,
|
||||
(main_t)USER_ENTRYPOINT, (const char **)NULL);
|
||||
(main_t)CONFIG_USER_ENTRYPOINT, (const char **)NULL);
|
||||
#endif
|
||||
ASSERT(init_taskid != ERROR);
|
||||
return OK;
|
||||
|
||||
@@ -948,10 +948,11 @@ void sem_restorebaseprio(FAR _TCB *stcb, FAR sem_t *sem)
|
||||
(sem->semcount <= 0 && stcb != NULL));
|
||||
|
||||
/* Handler semaphore counts posed from an interrupt handler differently
|
||||
* from interrupts posted from threads. The priority difference is that
|
||||
* from interrupts posted from threads. The primary difference is that
|
||||
* if the semaphore is posted from a thread, then the poster thread is
|
||||
* a player in the priority inheritance scheme. The interrupt handler
|
||||
* externally injects the new count without participated itself.
|
||||
* externally injects the new count without otherwise participating
|
||||
* itself.
|
||||
*/
|
||||
|
||||
if (up_interrupt_context())
|
||||
|
||||
@@ -104,10 +104,16 @@ int work_cancel(struct work_s *work)
|
||||
flags = irqsave();
|
||||
if (work->worker != NULL)
|
||||
{
|
||||
DEBUGASSERT(work->dq.blink || (FAR dq_entry_t *)work == g_work.head);
|
||||
DEBUGASSERT(work->dq.flink || (FAR dq_entry_t *)work == g_work.tail);
|
||||
dq_rem((FAR dq_entry_t *)work, &g_work);
|
||||
/* A little test of the integrity of the work queue */
|
||||
|
||||
DEBUGASSERT(work->dq.flink ||(FAR dq_entry_t *)work == g_work.tail);
|
||||
DEBUGASSERT(work->dq.blink ||(FAR dq_entry_t *)work == g_work.head);
|
||||
|
||||
/* Remove the entry from the work queue and make sure that it is
|
||||
* mark as availalbe (i.e., the worker field is nullified).
|
||||
*/
|
||||
|
||||
dq_rem((FAR dq_entry_t *)work, &g_work);
|
||||
work->worker = NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user