Commit Graph

84 Commits

Author SHA1 Message Date
Gregory Nutt
5b385f4d4d kthread_create(): Rename kernel_thread() to kthread_create() for better naming consistency with task_create() and kthread_delete(). 2017-10-16 11:38:00 -06:00
Gregory Nutt
e7c52bac60 Squashed commit of the following:
sched/mqueue:  Rename all private static functions for use the nxmq_ vs. mq_ naming.

    sched/mqueue:  Rename all OS internal functions declared in sched/mqueue/mqueue.h to begin with nxmq_ vs. mq_.  The mq_ prefix is reserved for standard application interfaces.
2017-10-09 09:06:46 -06:00
Gregory Nutt
8198ba6a6d This change renames all internal, private NuttX signal-related functions to use the prefix nxsig_ so that they cannot be confused with application interfaces that begin, primarily, with sig_
This is analogous to similar renaming that was done previously for semaphores.

Squashed commit of the following:

    sched/signal:  Fix a few compile warnings introduced by naming changes.

    sched/signal:  Rename all private, internal signl functions to use the nxsig_ prefix.

    sched/signal:  Rename sig_removependingsignal, sig_unmaskpendingsignal, and sig_mqnotempty to nxsig_remove_pendingsignal, nxsig_unmask_pendingsignal, and nxsig_mqnotempty to make it clear that these are OS internal interfaces.

    sched/signal:  Rename sig_findaction and sig_lowest to nxsig_find_action and nxsig_lowest to make it clear that these are OS internal interfaces.

    sched/signal:  Rename sig_allocatepingsigaction and sig_deliver to nxsig_alloc_pendingsigaction and nxsig_deliver to make it clear that these are OS internal interfaces.

    sched/signal:  Rename sig_cleanup, sig_release, sig_releasependingaction, and sig_releasependingsignal to nxsig_cleanup, nxsig_release, nxsig_release_pendingaction, and nxsig_release_pendingsignal to make it clear that these are OS internal interfaces.

    sched/signal:  Rename sig_tcbdispatch and sig_dispatch to nxsig_tcbdispatch and nxsig_dispatch to make it clear that these are OS internal interfaces.

    sched/signal:  Rename sig_releaseaction and sig_pendingset to nxsig_release_action and nxsig_pendingset to make it clear that these are OS internal interfaces.

    sched/signal:  Rename sig_initialize and sig_allocateactionblock to nxsig_initialize and nxsig_alloc_actionblock to make it clear that these are OS internal interfaces.
2017-10-05 13:25:25 -06:00
Gregory Nutt
83cdb0c552 Squashed commit of the following:
libc/semaphore:  Add nxsem_getvalue() which is identical to sem_getvalue() except that it never modifies the errno variable.  Changed all references to sem_getvalue in the OS to nxsem_getvalue().

    sched/semaphore:  Rename all internal private functions from sem_xyz to nxsem_xyz.  The sem_ prefix is (will be) reserved only for the application semaphore interfaces.

    libc/semaphore:  Add nxsem_init() which is identical to sem_init() except that it never modifies the errno variable.  Changed all references to sem_init in the OS to nxsem_init().

    sched/semaphore:  Rename sem_tickwait() to nxsem_tickwait() so that it is clear this is an internal OS function.

    sched/semaphoate:  Rename sem_reset() to nxsem_reset() so that it is clear this is an internal OS function.
2017-10-03 12:52:31 -06:00
Arjun Hary
b274a97840 Miscellaneous fixes from astyle tool. 2017-08-14 17:19:27 -06:00
Gregory Nutt
6579078287 Eliminate another warning. 2017-08-12 11:24:11 -06:00
Gregory Nutt
2245dddaf9 Break up some long lines 2017-06-14 13:42:56 -06:00
Gregory Nutt
4f5879f998 C library: Add ffs(). Add strings.h. Move strcasecmp, strncasecmp, bzero, bcmp, and bcopy to where they belong in strings.h.h, not string.h. bzero, bcmp, and bcopy are legacy functions; the contemporary counterparts should be used instead. 2017-02-16 16:10:09 -06:00
Gregory Nutt
113d8bdcca Fix some SMP-related compilation errors 2016-12-09 17:10:59 -06:00
Gregory Nutt
018db84567 Flesh out more cancellation point logic. 2016-12-09 10:31:40 -06:00
Gregory Nutt
6a20560ba2 Trivia fix to typo in comment 2016-10-26 12:29:36 -06:00
Gregory Nutt
7370d3171a Move include/nuttx/lib.h to include/nuttx/lib/lib.h 2016-07-21 14:05:44 -06:00
Gregory Nutt
62d8f839c7 SYSLOG: Now a two phase initialization. Some SYSLOG channels cannot be initialized until later in the bringup 2016-06-21 07:52:24 -06:00
Gregory Nutt
43eb04bb8f Without lowsyslog() *llinfo() is not useful. Eliminate and replace with *info(). 2016-06-20 11:59:15 -06:00
Gregory Nutt
13cac3b592 sched/: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition. 2016-06-11 16:42:42 -06:00
Gregory Nutt
a1469a3e95 Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err() 2016-06-11 15:50:49 -06:00
Gregory Nutt
e99301d7c2 Rename *lldbg to *llerr 2016-06-11 14:55:27 -06:00
Gregory Nutt
fc3540cffe Replace all occurrences of vdbg with vinfo 2016-06-11 11:59:51 -06:00
Gregory Nutt
80d0b2736e Reorder some logic: (1) set initial CPU IDLE task regsters AFTER allocating stack, (2) invalidate cache in CPU start-up BEFORE handling first interrupt. 2016-05-22 15:01:49 -06:00
Gregory Nutt
32838fcc2c enter/leave_critical_section: In SMP configuration, may attempt to access the task lists before they have been initialized 2016-05-18 09:17:01 -06:00
Gregory Nutt
3d87005e5a Fix some compilation issues when certain combinations of debug options are selected. 2016-05-17 12:06:32 -06:00
Gregory Nutt
faca2fb1e7 ARMv7-A/i.MX6: Add logic to handle allocation of CPU IDLE thread stacks more efficiently 2016-05-13 11:39:42 -06:00
Gregory Nutt
70782b0f14 ARMv7-A i.MX6: More SMP logic. Still untested. 2016-05-12 15:04:46 -06:00
Gregory Nutt
7f19631338 sched/: Add option to buffer scheduler instrumentation data in memory. 2016-03-17 09:49:43 -06:00
Gregory Nutt
2225940155 SMP: Add per-CPU initialization logic 2016-03-13 07:16:56 -06:00
Gregory Nutt
79c1fa5bd7 SMP: Simplified SMP interfaces 2016-03-12 15:29:33 -06:00
Gregory Nutt
a633353ec3 Add a CPU affinity set to the TCB if SMP is enable and use this CPU set as a mask for determining which CPUs the thread may run on. Add an affinity field to the attrributes to permit controlling which CPUs a pthread may run on. Implements pthread_att_setaffinity_np() and pthread_attr_getaffinity_np(). 2016-02-19 17:33:35 -06:00
Gregory Nutt
95735519dd SMP: Cosmetic renaming to clarify functionality of SMP interfaces. Update comments. 2016-02-17 13:36:25 -06:00
Gregory Nutt
6aeb4a52e8 Performance improvement: Idle loop should not take MM semaphore if there is not garbage to be collected. This can cause loss of performance and thrashing in tasking 2016-02-16 19:33:22 -06:00
Gregory Nutt
6dfa72d038 SMP: Fix some dumb but difficult to debug errors 2016-02-16 16:43:19 -06:00
Gregory Nutt
8774e7a4a0 SMP: Fix missing initialization value 2016-02-15 18:35:05 -06:00
Gregory Nutt
fc842d740a SMP: os_start needs to hold the KMM semaphore to prevent threads from allocating memory until the bring-up is complete 2016-02-15 11:07:42 -06:00
Gregory Nutt
a604a86980 Fix an error introduced in a previous commit 2016-02-13 10:48:30 -06:00
Gregory Nutt
8ac699b63d SMP: Need to perform all IDLE task memory allocations on initializatin thread prior to starting the other CPUs 2016-02-13 09:04:54 -06:00
Gregory Nutt
f45166af32 SMP: Fix a IDLE task semaphore operation 2016-02-12 18:03:08 -06:00
Gregory Nutt
3f7f58de9d SMP: Fix some debug assertion problems when DEBUG is enabled; Partial fix for one bring-up issue 2016-02-12 17:13:38 -06:00
Gregory Nutt
7d7f4e140c OS: Add a RUNNABLE attribute to the tasklists to indicate if the task list includes the currently executing task. Use this additional bit of information to determine if a context switch could really occur when removing a TCB from a task list 2016-02-12 08:15:16 -06:00
Gregory Nutt
c315479a04 SMP: Move IDLE thread init logic from sim to OS; need to assign unique IDs to each IDLE task 2016-02-11 14:11:26 -06:00
Gregory Nutt
ddbc948895 SMP: Minor SMP-related clean-up/improvements 2016-02-11 12:18:54 -06:00
Gregory Nutt
49227fa554 Scheduler: Replace the boolean 'prioritized' with a uint8_t bit set so that additional attributes of a list can be specified without adding more boolean values. 2016-02-11 08:06:33 -06:00
Gregory Nutt
0a7e136a5a SMP: Idle thread must be assigned to a CPU 2016-02-11 08:01:09 -06:00
Gregory Nutt
96223cedf1 SMP: A little more 2016-02-10 15:43:05 -06:00
Gregory Nutt
3147dfc7d5 SMP: Add some tentative initialization logic 2016-02-10 13:49:27 -06:00
Gregory Nutt
47a5663f8c SMP: A few preliminary data structure definitions 2016-02-10 11:45:26 -06:00
Gregory Nutt
2dc258986d Add a state variable that provides the current level of OS initialization. This is needed by some logic that may attempt to run early in the start-up sequence, but cannot run if a sufficient level of initializaitn has not not yet occurred 2016-02-05 08:34:03 -06:00
Gregory Nutt
79d554939e sched/: Fix some spacing issues 2015-10-07 19:59:14 -06:00
Gregory Nutt
cb9e27c3b0 Standardize naming used for public data and function groupings 2015-10-02 16:30:35 -06:00
Gregory Nutt
d78d3ef4ab Logic for delayed memory garbage collection for the case of user space memory will not work as implemented for the case of the kernel build. That is because the correct context is in place in order to free the user memory when sched_kufree is called, but will not be in place later when the memory garbage collection runs. If this feature is really needed, then some more substantial redesign is required 2015-09-07 14:40:18 -06:00
Gregory Nutt
12d61531aa Move board_ prototypes from arch.h to board.h 2015-02-27 20:02:03 -06:00
Gregory Nutt
8840102554 Networking: Divide net_intiialize() into net_setup() and net_initialize() to solve a chicken-and-egg problem. net_setup() must be caleld before up_initialize() is called so that networking data structures are ready to register new network devices.
net_initialize() now does only timer related operations and is called AFTER up_initialize() where the timers are configured.  This is really.
2015-02-14 06:36:53 -06:00