Gregory Nutt
4490744def
Add logic to reset the replenish the sporadic scheduler when a task is resumed
2015-07-24 09:55:02 -06:00
Gregory Nutt
ea7dbc984b
Add basic sporadic schedule state machine
2015-07-24 09:03:21 -06:00
Gregory Nutt
3b1306078b
Sporadic Scheduler: Ensure that the replenishment period is greater than or equal to the budget period
2015-07-23 15:08:41 -06:00
Gregory Nutt
5baa738019
Most cosmetic, but includes some fixes to some range checking
2015-07-23 14:36:49 -06:00
Gregory Nutt
53a17bfd99
Fix a newly introduced compilation error when round roben scheduling is disabled
2015-07-23 13:35:48 -06:00
Gregory Nutt
9095e8eab4
include/, sched/, and libc/: Add support for sporadic scheduling parameters in struct sched_param, posix_spawnattr_t, and pthread_attr_t. Update all user interfaces to pass sporadic scheduling parameters. Feature is dependent on EXPERIMENTAL and no changes have yet been made to core scheduling logic.
2015-07-23 13:16:32 -06:00
Gregory Nutt
13e837b957
Merge remote-tracking branch 'origin/master' into sporadic
2015-07-23 11:25:52 -06:00
Gregory Nutt
aa90da2bc8
pthread_create: Fix an (unlikely) error in fallback value in the event of a failure (which should never occur)
2015-07-23 11:25:25 -06:00
Gregory Nutt
2b3aae0ddc
Add basic configuration options for SCHED_SPORADIC
2015-07-23 10:33:30 -06:00
Gregory Nutt
146bdc3c93
TCB: Increase the size of the scheduling policy field from 1 to 2 bits to allow additional, planned scheduling policies
2015-07-23 10:15:07 -06:00
Gregory Nutt
e69d14d89b
Fix some warnings/errors detected by nuttx/tools/testbuilds.sh
2015-07-10 18:41:26 -06:00
Max Neklyudov
14e742b108
Implement WNOHANG for waitpid() only and for the case of CONFIG_SCHED_HAVE_PARENT not selected. From Max Neklyudov.
2015-07-02 09:34:58 -06:00
Jussi Kivilinna
13d9383679
Group binding needs to be cleared before sched_releasetcb(), as otherwise group_leave() will be called and group->tg_nmembers decremented or group being released. group_leave() should be called only after group_join() is called, not after group_bind(). From Jussi Kivilinna.
2015-07-01 06:24:34 -06:00
Gregory Nutt
342f5fe33d
Fix references to the no-longer-existent misc/ directory in comments, README files, and documentation
2015-06-28 08:08:57 -06:00
Max Neklyudov
61af0d511f
Use up_timer_gettime for CLOCK_MONOTONIC in tickless mode. From Max Neklyudov.
2015-06-22 06:37:26 -06:00
Juha Niskanen
e1846dff82
sched/pthread: Implement pthread_mutex_trylock() for recursive mutexes
2015-06-16 08:32:20 -06:00
Juha Niskanen
d16053c33c
sched/pthread: Use -1 instead of 0 as PID for unclaimed mutexes
2015-06-16 08:27:38 -06:00
Gregory Nutt
d8db596b3b
POSIX message queues: Move mq_setattr() and mq_getattr() from nuttx/libc/mqueue to nuttx/sched/mqueue. Also add sysyscall support for mq_setattr() and mq_getattr(). This is necessary in protected and kernel builds because in those cases the message queue structure is protect and cannot be accessed directly from user mode code. Noted by Jouko Holopainen.
2015-06-03 09:24:17 -06:00
Gregory Nutt
84f0303fc0
mq_timedreceive() move the location where the errno value is set; the TIMEDOUT errno setting was being overwritten by subsequent actions before returning. Noted by Freddie Chopin.
2015-06-03 07:24:50 -06:00
Gregory Nutt
4adda9d428
Fix numerous typos in configuration variable names. Tracked down by Alan Carvalho de Assis
2015-05-23 17:08:35 -06:00
Gregory Nutt
3adcae8ffb
Update the type passed to watchdog timer handlers. Using uint32_t is a problem for 64-bit machines.
2015-05-18 08:53:42 -06:00
Gregory Nutt
16276a4793
Change the order of some operations to prevent a debug assertion from firing.
2015-05-18 06:34:54 -06:00
Gregory Nutt
cc77a28f40
If HAVE_GROUP_MEMBERS is not defined, then pthread_kill() really is the same as kill()
2015-05-13 20:34:21 -06:00
Gregory Nutt
4417728955
Re-implemened pthread_kill(). It as just a simple wrapper around kill() but since the correct dispatching of singles for multi-threaded task groups has been implemented, calling kill() does no work. The corrected implementation of pthread_kill() will direct the signal specifically to the specific pthread and no other.
2015-05-13 14:43:43 -06:00
Gregory Nutt
8cb4e78a1a
Complete implementation of the IPv6 routing logic. From Max Neklyudov.
2015-05-13 07:22:02 -06:00
Gregory Nutt
071658bb6d
Another missing semicolon
2015-04-23 07:18:59 -06:00
Gregory Nutt
093a144934
sem_wait(): Missing comma on debug statement caused compile error with DEBUG on. Why hasn't that been noted before?
2015-04-23 07:15:55 -06:00
Gregory Nutt
f161a1d0f7
atexit: Fix reference to undefined variable in certain configurations. From Juha Niskanen
2015-04-14 07:31:35 -06:00
Gregory Nutt
b4423c1eed
Make some file section headers more consistent with standard
2015-04-08 06:47:36 -06:00
Gregory Nutt
af6d9e2684
sched: Do not use uninitialized boolean in waitpid(). From Juha Niskanen
2015-03-12 07:45:10 -06:00
Gregory Nutt
caea44a624
Fix a case in mq_timedsend() where the return errno value was being overwritten
2015-03-10 12:05:33 -06:00
Gregory Nutt
7d46801f46
Reorder some operations to minimize a race condition
2015-03-10 10:41:21 -06:00
Gregory Nutt
4c6057eca1
mq_timedsend(): Do check for time errors if the message queue is not full. Noted by Freddie Chopin
2015-03-10 09:42:35 -06:00
Gregory Nutt
12d61531aa
Move board_ prototypes from arch.h to board.h
2015-02-27 20:02:03 -06:00
Gregory Nutt
127951e029
Fix places where the errno value was being overwritten by subsequent actions so that the returned errno value was incorrect. From Max Neklyudov.
2015-02-25 07:45:04 -06:00
Gregory Nutt
c99d927527
When an RTC is used, clock_systimespec() must subtract the basetime from the RTC time
2015-02-25 07:24:03 -06:00
Gregory Nutt
cded7ea682
Fix some time value changes; mostly changing greater than 1000000000 to greater than or equal to 1000000000. From Juha Niskanen
2015-02-20 07:07:36 -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
Gregory Nutt
a1d3faaa8a
Update ChangeLog
2015-02-13 18:39:43 -06:00
Gregory Nutt
bc273596bb
Back out commit d998cbdfa6c10dbd8074dd43c39c23a006505987
2015-02-13 18:32:15 -06:00
Gregory Nutt
0fcd620404
Move the initialization of the networking subsystem to AFTER up_initialize is called. Fromo Macs Neklyudov.
2015-02-13 13:41:21 -06:00
Gregory Nutt
3724a5e98e
RTC: Remove all backdoor interfaces from rtc.h
2015-02-13 08:41:34 -06:00
Gregory Nutt
d9f960e97b
Fix a problem in clock_systimer64 that occurs when (1) the 64-bit system time is enabled, and (2) the value of CONFIG_USEC_PER_TICK is less than 1 millisconds (such as when using the tickless mode of operation). In that case, the convertion of time to 64-bit millisecond value in clock_systmer64() causes some bad times to be returned. Time was converted to milliseconds, then to configured ticks. Precision was lost in the millisecond convertion.
...
The fix is to first convert time to a 64-bit microsecond value, then to the configured tick value.
Noted by David Sidrane.
2015-02-13 06:13:47 -06:00
Gregory Nutt
147042218b
gettimeofday() and settimeofday(): Move gittimeofdady() from sched/clock to libc/time. All remove gettimeofday() from NuttX system calls. It is only a wrapper around clock_settime() and does not need a trap. gettimeofday() is no longer tried as a core OS interface.
...
gettimeofday has been decremented in POSIX 2008. settimeofday() was never part of POSIX, but I decided to add it to libc as well just for symmetry.
2015-02-12 11:10:46 -06:00
Gregory Nutt
1d534ff896
Convert the 64-bit usec limit to a 32-bit tick limit
2015-02-03 07:18:17 -06:00
Gregory Nutt
c5ab7c39d3
Eliminates a warning. From Macs N
2015-02-03 06:44:59 -06:00
Gregory Nutt
a448e0f69f
On my platform I have just 16-bit timer clocked at 32kHz. As result oneshot timer max delay is 2s. The patch adds limit of maximum ticks in sched_timer_start (nuttx/sched/sched/sched_timerexpiration.c). From Macs N.
2015-02-03 06:25:19 -06:00
Gregory Nutt
e69003cbf7
clock_systimespec(): Fixes for compilation errors in certain configurations. From Macs N.
2015-01-30 08:19:40 -06:00
Gregory Nutt
6bc9a0c9c6
Fix backward calculation in the work queue timing. From Liio Chen via the PX4 repository
2015-01-27 06:17:02 -06:00
Gregory Nutt
826f5516ff
Semaphores: sem_waitirq.c must be built when signals are disabled. That is because not handles not only the case of semaphore wait being awakened by a signal, but also the case with sem_timedwait.c when the semaphore wait is awakened by a timeout.
2014-12-28 15:03:12 -06:00
Gregory Nutt
78b755961f
Semahores: Remove a warning with SIGNALS are disabled
2014-12-28 14:54:40 -06:00
Gregory Nutt
937f9f23f1
strncpy will not copy the terminating \0 into the destination if the source is larger than the size of the destination. Ensure that the last byte is always zero and let strncpy only copy CONFIG_TASK_NAME_SIZE bytes. The issue of unterminated names can be observed in ps when creating a pthread while CONFIG_TASK_NAME_SIZE is set to 8.
2014-12-17 12:24:02 -06:00
Gregory Nutt
b3a1939020
Sempahores: Add logic to clean up after task_delete() or pthread_cancel() if the task happens to be waiting on a semaphore when it is cancelled
2014-12-13 12:02:25 -06:00
Gregory Nutt
1003ee3e9a
Costmetic change to a comment
2014-12-13 10:41:57 -06:00
Gregory Nutt
ff87e2e02a
In message queue created return ENOSPC error if size exceeds the configured size of pre-allocatd messages; Use ENOSPC vs ENOMEM per OpenGroup.org. From Pierre-Noel Bouteville
2014-12-06 07:18:48 -06:00
Gregory Nutt
ad05793c0f
msg type should be char * not void * in mq_send, mq_timedsend, mq_receive, and mq_timedreceive. Noted by Pierre-Noel Bouteville
2014-12-05 19:16:14 -06:00
Gregory Nutt
2ab604f74f
Fix more issues detected by cppcheck
2014-11-25 14:25:02 -06:00
Gregory Nutt
1aa528a572
More fixes to problems noted by cppcheck. Some are kind of risky; some are real bugs.
2014-11-25 14:10:35 -06:00
Gregory Nutt
6f94e5e4be
Cosmetic chnages to comments
2014-11-20 07:10:48 -06:00
Gregory Nutt
8c28718bcb
alling mq_timedreceived with immediate timeout was getting stuck and not
...
timeout. Immediate timeout is achieved by setting absolute timeout value to
past time, for example abstime={ .tv_sec=0, .tv_nsec=0 }. However absolute
time was converted to relative time using unsigned integer arithmetic and
resulted large ticks count by clock_abstime2ticks, instead of expected negative
ticks value.
Patch corrects clock_abstime2ticks to return negative ticks, if absolute time
is in the past.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@haltian.com>
2014-11-19 09:25:00 -06:00
Gregory Nutt
9e290c10b5
Fix some compile issues introduces with removal of CONFIG_MAX_TASK_ARGS
2014-11-14 09:53:11 -06:00
Gregory Nutt
838f2053e4
Fix some compile errors introduce in last commits
2014-11-13 07:44:45 -06:00
Gregory Nutt
bc265d74e7
task_create: Don't even try if the accumulated size of the argument list is larger than the stack
2014-11-13 06:44:15 -06:00
Gregory Nutt
bb9b0f572d
vfork no longer depends on CONFIG_MAX_TASK_ARGS
2014-11-12 19:01:29 -06:00
Gregory Nutt
4638a97f97
task_start() no longer depends on CONFIG_MAX_TASK_ARGS
2014-11-12 18:54:35 -06:00
Gregory Nutt
ffbd6cf10a
task_setup() no longer depends on CONFIG_MAX_TASK_ARGS
2014-11-12 18:49:58 -06:00
Gregory Nutt
fcffafee30
Remove CONFIG_MAX_TASK_ARGS from all Kconfigs and defconfigs
2014-11-12 18:02:19 -06:00
Gregory Nutt
2caeead612
Fix an important bug in the watchdog creation logic
2014-11-10 18:15:26 -06:00
Gregory Nutt
fcc2a1bb4b
Fix incorrect comment
2014-11-07 15:54:24 -06:00
Gregory Nutt
2da26f7884
More fixes to tickless operation, alarm/mode code. From Brandon Warhurst
2014-10-23 07:13:57 -06:00
Gregory Nutt
a7a5c8cff3
Fixes to tickless operation code. From Brandon Warhurst
2014-10-23 06:41:31 -06:00
Gregory Nutt
928b0bda3d
Default for CONFIG_SCHED_HPWORK should be no
2014-10-14 16:56:37 -06:00
Gregory Nutt
179fabb019
Add description of work queues to the porting guide. Update comments
2014-10-14 10:21:18 -06:00
Gregory Nutt
c9563da832
Missing workqueue logic
2014-10-12 17:19:51 -06:00
Gregory Nutt
e702d9396b
Fix one missed name change from last big commit
2014-10-12 07:09:57 -06:00
Gregory Nutt
c9d7472d68
Change naming of HP work queue configuration varaibles to be symmetric with LP work queue naming
2014-10-11 17:03:44 -06:00
Gregory Nutt
1a27a4d4c0
Eliminate warnings
2014-10-11 17:02:35 -06:00
Gregory Nutt
b78fe7c270
Rename CONFIG_SCHED_USRWORK to CONFIG_LIB_USRWORK
2014-10-11 15:59:40 -06:00
Gregory Nutt
9292e3d9de
Decouple the user-space work queue from the kernel space work queues
2014-10-11 15:50:22 -06:00
Gregory Nutt
bb1d91bd83
Make building of low-priority work queue independent of also building the high-priority work queue
2014-10-11 14:43:24 -06:00
Gregory Nutt
c0b703ac73
Fix some missing conditional compilation that caused build failures in some configurations
2014-10-11 08:50:00 -06:00
Gregory Nutt
d2424ac65c
Fix a couple of problems introduced in the last commmits
2014-10-11 08:29:26 -06:00
Gregory Nutt
0218f01f12
If there mutliple low-priority worker threads, only one needs to perform garbage collection
2014-10-11 07:09:21 -06:00
Gregory Nutt
234f73cb09
Add logic for priority inheritance with multiple worker threads. How should this work? Tentatively, the all get reprioritized together. It would be best to just reprioritize the single thread doing the high priority work, but we don't know which that will be in advance
2014-10-10 17:47:39 -06:00
Gregory Nutt
4a4b3ac537
Add support for multiple low-priority worker threads
2014-10-10 16:24:50 -06:00
Gregory Nutt
438e3e1a90
Fix a few bugs introduced in the last checkin
2014-10-10 15:06:13 -06:00
Gregory Nutt
cf59a195ba
User-mode work queue logic should not disable interrupts
2014-10-10 14:52:04 -06:00
Gregory Nutt
16a3e83258
Add support for delays of different durations in work queue processing
2014-10-10 13:21:37 -06:00
Gregory Nutt
75e7a4dbfc
Minor changes to work queue timing logic
2014-10-10 12:27:11 -06:00
Gregory Nutt
b2cebaa9d4
Modularize starting of worker threads to better isolate individual initialization characteristics
2014-10-10 09:38:28 -06:00
Gregory Nutt
2015fd76e2
Fix some conditional logic in last work queue repartitioning change
2014-10-10 08:47:41 -06:00
Gregory Nutt
1afc9773ac
Decoupling work queue data structures. This is part of the preparation to support multiple low-priority worker threads
2014-10-10 08:35:58 -06:00
Gregory Nutt
6220256a09
Repartition work queue code. Move kernel-specific parts from libc/wqueue to sched/wqueue
2014-10-10 06:22:51 -06:00
Gregory Nutt
7f36c4e97b
Update some Kconfig comments; Add a upper limit on the lower priority worker thread for priority inheritance
2014-10-07 17:11:26 -06:00
Gregory Nutt
322f9f401c
Simplify how C source files are selected in the build
2014-10-07 07:42:36 -06:00
Gregory Nutt
d7843c8e24
Add support for priority inheritance on the low priority worker queue
2014-10-07 07:41:52 -06:00
Gregory Nutt
38ddbc774f
Cosmetic change to comments
2014-10-06 18:03:01 -06:00
Gregory Nutt
37cf4135c4
fs_initialize() is no longer weak
2014-10-06 11:45:35 -06:00
Gregory Nutt
d914f3ceec
Major structure of file system functions to better support asynchronous I/O. Respository should not be trusted until I have a chance to verify everything
2014-10-06 10:53:25 -06:00
Gregory Nutt
87eb1d47ed
Fix some recently introduced typos, build problems, and warnings
2014-10-05 16:58:52 -06:00
Gregory Nutt
652d3ed29d
Rename CONFIG_LIBC_AIO to CONFIG_FS_AIO since it is now an OS property
2014-10-05 15:44:43 -06:00
Gregory Nutt
31cdcde73a
Add definitions for SIGPOLL
2014-10-05 06:02:37 -06:00
Gregory Nutt
da29907ac9
Update TODO list + cosmetic changes to clock_systimer.c
2014-10-03 11:21:35 -06:00
Gregory Nutt
8d43a6bdcd
Fix build error with CONFIG_SYSTEM_TIME64
2014-10-03 10:20:46 -06:00
Gregory Nutt
71b574f26c
Repartition some message queue logic: sched/mqueue should have all mqueue knowledge; fs/mqueue should deal only with inodes
2014-09-30 08:03:39 -06:00
Gregory Nutt
fcfe877e96
Cosmetic update to comments
2014-09-29 16:22:21 -06:00
Gregory Nutt
1f2cc9f4fe
Complete re-implementation of mq_close
2014-09-29 15:33:34 -06:00
Gregory Nutt
584d0fe4ad
Complete re-implementation of mq_open()
2014-09-29 14:59:31 -06:00
Gregory Nutt
9e975a217d
Separate mqueue allocation logic from mq_open() and put it in sched/mqueue/mq_msgqalloc.c
2014-09-29 14:09:31 -06:00
Gregory Nutt
b0f80cc8db
Move mq_open.c, mq_close.c, and mq_unlink.c from sched/mqueue to fs/mqueue
2014-09-29 13:35:32 -06:00
Gregory Nutt
e3fa34681b
Convert mqueue structure for use in VFS as inode data; rename mqueue_inode_s; remove links, reference counts and name from mqueue structure. These will be replaced by VFS data. Remove g_msgqueues and mq_findnamed.c; these will be replace with VFS logic
2014-09-29 13:19:11 -06:00
Gregory Nutt
542e706d7d
Fix a perverse case where vfork() is called from a pthread. Still not recommended
2014-09-29 12:21:34 -06:00
Gregory Nutt
1dc9768c1a
Fix vfork(). Now that arguments are kept on the stack, the way that arguments are passed from parent to child in vfork() must change. This bug has always been present, but was not visible with the old strdup() way of passing arguments
2014-09-29 10:45:44 -06:00
Gregory Nutt
9a3f18db37
Fix missing header file for bug introduced yesterday
2014-09-29 07:48:45 -06:00
Gregory Nutt
8c958be5ab
Semaphore initialization is now only required if priority inheritance is initialized
2014-09-29 06:50:48 -06:00
Gregory Nutt
650a0d0615
Completes VFS-based named semaphore implemetation. Still a little buggy
2014-09-28 15:58:56 -06:00
Gregory Nutt
30694f064c
Add VFS-based sem_open() implementation
2014-09-28 14:35:17 -06:00
Gregory Nutt
a41c1de32c
Add basic data structures that will allow us to move named semaphore support out of the OS and into the VFS (not complete).
2014-09-28 10:15:33 -06:00
Gregory Nutt
b33c2d9cef
Move include/nuttx/mm.h to include/nuttx/mm/mm.h
2014-09-24 07:29:09 -06:00
Gregory Nutt
1863370672
Move include/nuttx/shm.h to include/nuttx/mm/shm.h
2014-09-24 07:05:02 -06:00
Gregory Nutt
835c91b03a
Add support for a per-process virtual page allocator. This is a new member of the task_group_s structure. The allocaor must be initialized when a new user process is started and uninitialize when the process group is finally destroyed. It is used by shmat() and shmdt() to pick the virtual address onto which to map the shared physical memory.
2014-09-23 16:04:39 -06:00
Gregory Nutt
e326fcfef3
Fix some inconsistent field name in struct task_group_s: addrenv should be tg_addrenv.
2014-09-23 16:01:44 -06:00
Gregory Nutt
a73a3ef99f
Add shared memory initializatin logic
2014-09-23 08:46:31 -06:00
Gregory Nutt
5d9276ed71
More changes so that the KNSH build survives the changes needed for the ELF build
2014-09-16 15:55:21 -06:00
Gregory Nutt
1ef758d67f
A couple more changes for clean ELF build
2014-09-16 15:40:48 -06:00
Gregory Nutt
925fc9ad81
First round of changes to get the ELF configuration building again
2014-09-16 15:37:05 -06:00
Gregory Nutt
701719b2ca
Don't release user stack in kernel build. Already destroyed with all of the address environment
2014-09-15 12:45:41 -06:00
Gregory Nutt
a5e30ac4a1
execv() is a basic system interface. It should not be in libc/ but rather in sched/task. Its symboltable helper logic also belongs in the kernel but belings in binfmt/ with the other symbol table logic
2014-09-15 10:16:20 -06:00
Gregory Nutt
da7a440b35
execv() is a basic system interface. It should not be in libc/ but rather in sched/task. Its symboltable helper logic also belongs in the kernel but belings in binfmt/ with the other symbol table logic
2014-09-15 10:15:19 -06:00
Gregory Nutt
3649dab9bd
Initial integration of kernel stack (does not work)
2014-09-14 11:19:34 -06:00
Gregory Nutt
e12213592b
Don't build task_create() or task_spawn() interfaces if there is an addres environment
2014-09-14 08:22:21 -06:00
Gregory Nutt
eae146d641
Kernel proxy thread should be a kernel thread, not a user task
2014-09-14 08:20:40 -06:00
Gregory Nutt
ba7d5acf94
Fix a couple more places where the wrong allocator is being used
2014-09-11 15:56:04 -06:00
Gregory Nutt
fc35e35165
When a privileged thread exits, we have to use the kernel alloctor to free memory; when an unprivileged thread exits, we don't have to do anything... heap memory will be cleaned up when the address environment is torn down
2014-09-11 09:00:10 -06:00
Gregory Nutt
44499ed46c
Rename some functions and reshuffling some paramters
2014-09-11 08:37:06 -06:00
Gregory Nutt
81a4de4a4d
Kconfig choice value needs a prompt
2014-09-11 07:18:33 -06:00
Gregory Nutt
4a20cd65c5
clock_gettime.c: Fix a cornercase bug in clock_gettime()
2014-09-10 17:10:54 -06:00
Gregory Nutt
c19659d7d2
Fixes to clock bias logic. Remove vestiges of g_tickbias; apply bias instead to g_basetime
2014-09-10 16:36:25 -06:00
Gregory Nutt
e953fb11cd
A const storage class to to phthread parameters. From Freddie Chopin
2014-09-08 06:21:48 -06:00
Gregory Nutt
1822b86373
Fix some conditional compilation in kernel build mode. And, while we are touching this logic, make g_default_pthread_attr const.
2014-09-07 10:46:58 -06:00
Gregory Nutt
47d55c28dc
Mostly cosmetic changes
2014-09-04 10:28:38 -06:00
Gregory Nutt
e958040269
Add capability to perform initial board initialization on a separate worker thread.
2014-09-03 18:36:43 -06:00
Gregory Nutt
b2a94b6f2b
Fix more places where the user-mode allocator is used to allocate kernel thread resources -- before the user-mode allocator even exists
2014-09-03 14:58:24 -06:00
Gregory Nutt
fd6205b62a
Group creation logic must use new group flag when allocating resources so that the privileges on the resource are set correctly
2014-09-03 13:49:35 -06:00
Gregory Nutt
c81093913a
IDLE TCB setup needs to indicate the the IDLE thread is a privileged, kernel thread
2014-09-03 13:47:11 -06:00
Gregory Nutt
b4438e44c5
Restructuring of build to allow use of use-space allocators by kernel logic in the kernel build.
2014-09-02 11:22:09 -06:00
Gregory Nutt
a5af2568eb
sbrk() need to initialized the memory manager on the first call
2014-09-02 08:05:11 -06:00
Gregory Nutt
0e3c182e3b
Fix error in initialize of IDLE TCB due to last change. The argument list is no long in the TCB, but in the stack. But not for the IDLE task. It needs its own mini-argv[] list so that it looks more like other threads.
2014-09-01 16:49:42 -06:00
Gregory Nutt
64ab35b399
There used to be two ways to pass parameters to new tasks, depending upon the configuration: Either (1) argv[] as created as an array with each string strdup'ed. Or (1) argv[] array and strings were created on the stack before the new task was started. Now, there is only one way, way (1). Way (2) might be slightly more compact, but this is not worth carry the complexity of two different ways of doing the same thing.
2014-09-01 15:39:34 -06:00
Gregory Nutt
23147c40a5
Remove final traces of the 8015 from the NuttX source tree
2014-09-01 13:21:15 -06:00
Gregory Nutt
205260d5e2
Reanem kzalloc to kmm_zalloc for consistency
2014-08-31 17:34:44 -06:00
Gregory Nutt
1780810d3d
Rename kmalloc to kmm_malloc for consistency
2014-08-31 17:26:36 -06:00
Gregory Nutt
54fa3b0b59
Rename kfree to kmm_free for consistency with other naming conventions
2014-08-31 17:04:02 -06:00
Gregory Nutt
9aca0c1c84
Rename kumalloc to kumm_malloc and kuzalloc to kumm_zalloc for consistency with other naming
2014-08-31 16:24:24 -06:00
Gregory Nutt
9ad7dae4c1
Rename kufree to kumm_free for consistency with other naming
2014-08-31 16:15:11 -06:00
Gregory Nutt
9cd1ddada4
Rename kmemalign to kmm_memalign and krealloc to kmm_realooc for consistency with other naming
2014-08-31 15:27:37 -06:00
Gregory Nutt
2904fb0420
Clean up some kernel build heap allocation issues. The Cortex-A kernel build now compiles without errors (but cannot link until brk() and sbrk() are implemented).
2014-08-31 12:50:05 -06:00
Gregory Nutt
67a54fd52e
ARMv7-A: A little more logic and a few more fixes for Cortex-A kernel build
2014-08-31 07:15:46 -06:00
Gregory Nutt
fc7bd31e07
last change alters semantics of __HAVE_KERNEL_GLOBALS
2014-08-30 14:44:48 -06:00
Gregory Nutt
2029236ed0
Back out and replace recent kludges for errno and clock_systimer. There is a cleaner way
2014-08-30 14:26:56 -06:00
Gregory Nutt
34ff07008a
Add configuration options to start the system from a program on a file system
2014-08-30 13:27:23 -06:00
Gregory Nutt
2906ff6a4a
Cosmetic: Fix all comments, defaults, etc. that references the defunct name user_start
2014-08-30 11:14:51 -06:00
Gregory Nutt
e3ff0689bb
Rename CONFIG_NUTTX_KERNEL to CONFIG_BUILD_PROTECTED; Partially integrate new CONFIG_BUILD_KERNEL
2014-08-29 14:47:22 -06:00
Gregory Nutt
0ab1b0de25
nuttx/sched: Remove explicit references to errno. That is a problem from within the kernel for certain configurations
2014-08-28 17:00:24 -06:00
Gregory Nutt
9ab67dce75
In some configurations, g_system_tmer must be extern'ed as a private variable
2014-08-28 17:00:03 -06:00
Gregory Nutt
45f3328247
Fix an error introduced into ALL implmentations of interrupt dispatch logic
2014-08-28 08:41:57 -06:00
Gregory Nutt
d35723749b
Minor address environment clean-up. Cannot generate debug contexts in certain contexts
2014-08-27 14:22:00 -06:00
Gregory Nutt
ad53cabf34
ADDRENV: Use a group flag to determine if there is an address environment (instead of the thread type)
2014-08-27 09:37:28 -06:00
Gregory Nutt
582800a04d
Add group_addrenv() which will be called during context switches in order to change address environments. Not yet hooked in
2014-08-26 14:57:05 -06:00
Gregory Nutt
af22f273d3
Add group_addrenv() which will be called during context switches in order to change address environments. Not yet hooked in
2014-08-26 14:54:39 -06:00
Gregory Nutt
1725946447
Misc changed to get the SAMA5 ELF configuration with address environments working
2014-08-25 13:28:13 -06:00
Gregory Nutt
e1799b0423
Cortex-A/SAMA5 address environment support is code complete (untested)
2014-08-25 11:18:32 -06:00
Gregory Nutt
1624e2fbcf
Change CONFIG_ADDRENV to CONFIG_ARCH_ADDRENV; change how it is selected -- the architecure must first declare support
2014-08-24 06:42:11 -06:00
Gregory Nutt
e79d6e3c8b
A few fixes for compilation errors due to recent address environment fixes
2014-08-22 15:55:00 -06:00
Gregory Nutt
4e699b00de
Need to release the addess environment when the task group is released
2014-08-22 14:49:05 -06:00
Gregory Nutt
1d586e6136
An address environment is the property of a task group, not of a thread
2014-08-22 12:32:34 -06:00
Gregory Nutt
fd484c4de9
Add support for statically allocated watchdog timer structures
2014-08-22 08:46:34 -06:00
Gregory Nutt
ad9b3f8ab8
wdog.h does not contain any application interface, only internal OS interface. Further, it is non-standard. Move wdog.h from include/ to include/nuttx. For the same reason, move the description of the watchdog timer interfaces from the Users Guide to the Porting Guide.
2014-08-21 11:16:55 -06:00
Gregory Nutt
952d87587f
If we run out of pre-allocated watchdog times, the logic will allocate additional timers from the heap. A reserve of pre-allocated watchdog timers is maintained so that there will always be timers available for interrupt handlers.
2014-08-21 08:44:29 -06:00
Gregory Nutt
27c48a383e
Don't do 64-bit calculations if accuracy not achievable; Fix compile error in high res RTC mode
2014-08-15 17:48:07 -06:00
Gregory Nutt
eed1d6c619
When reading the system timer, don't read a struct timespec, convert it to a fake tick count, then back to a timespec. Remove CLOCK_ACTIVETIME.. it is non-standard, unused, and gets in the way of changes like this
2014-08-15 03:55:41 -06:00
Gregory Nutt
2bc07a03ae
Correct release notes, updat changelog, fix some conditional compilation
2014-08-15 06:56:42 -06:00
Gregory Nutt
569a0815ca
Updated comments
2014-08-12 13:50:18 -06:00
Gregory Nutt
6546fa39c7
Tickless Stuff: Back out the risky timer operations when the ready-to-run list is modified. That is unsafe. An ugly workaround is just to keep an interval timer going all of the time with a minimum duration equal to the timeslice interval.
2014-08-12 11:12:00 -06:00
Gregory Nutt
686e5d7e3d
Tickless: If using an ALARM, then really should report time of expiration
2014-08-12 10:00:32 -06:00
Gregory Nutt
66803d0db6
Define interfaces to use an alarm instead of an interval timer with the tickless option
2014-08-12 07:28:41 -06:00
Gregory Nutt
e1fc925705
Minor update to handling of timeslick delay on tast switches
2014-08-11 15:07:15 -06:00
Gregory Nutt
56196ecea1
Fix a computation error in the fix for the last computational error
2014-08-11 12:07:49 -06:00
Gregory Nutt
b4bbe354fd
Fix inaccurate time conversion. Remove MSEC_PER_TICK and convert uint32_t to uin64_t.
2014-08-11 11:14:40 -06:00
Gregory Nutt
649ef76f71
Timers: In Tickless mode, need to stop the interval timer before inserted a new delay into the timer list. Otherwise, the time is incorrect on the first entry of the list
2014-08-11 08:25:25 -06:00
Gregory Nutt
f2058fa271
Comment out reassessment of timer in the middle of context switches. Need to revisit
2014-08-11 07:05:47 -06:00
Gregory Nutt
6bd52bce06
Tickless OS: Correct a bug: logic to detect changes in head of timer list was wrong.
2014-08-10 13:12:18 -06:00
Gregory Nutt
e1769b22f1
Remove os_internal.h it has been replace by several new header files under sched/. There have been some sneak inclusion paths via os_internal.h, so expect a few compilation errors for some architectures
2014-08-08 18:39:28 -06:00
Gregory Nutt
0be5f2ca81
Move exit.c to task/exit.c
2014-08-08 18:38:04 -06:00
Gregory Nutt
d798dd37a7
Replace os_internal.h with sched/sched.h in files that actually reference something in sched.h
2014-08-08 17:53:55 -06:00
Gregory Nutt
1f28365f55
Part of the last incomplete change
2014-08-08 17:45:54 -06:00
Gregory Nutt
ccf4ed2148
Partial (non-working) checked in before the big, risky automated change
2014-08-08 17:29:44 -06:00
Gregory Nutt
224ee05957
Move a few files in sched/ that did not seem to have a home to sched/signal and sched/task
2014-08-08 16:57:47 -06:00
Gregory Nutt
23a334c066
Move task control files from sched/ to sched/task
2014-08-08 16:44:08 -06:00
Gregory Nutt
6683d749ac
Move errno related files from sched/ to sched/errno
2014-08-08 15:52:55 -06:00
Gregory Nutt
9afca906eb
Move initialization functions from sched/ to sched/init
2014-08-08 15:30:59 -06:00
Gregory Nutt
a79ecce878
Move page fill sources from sched/ to sched/paging
2014-08-08 15:08:07 -06:00
Gregory Nutt
f8da16a8d3
Move POSIX timer files from sched/ to sched/timer/
2014-08-08 14:55:16 -06:00
Gregory Nutt
d4b56eb3cc
Move clock functions from sched/ to sched/clock
2014-08-08 14:43:02 -06:00
Gregory Nutt
85e8117062
Move interrupt dispatch logic from sched/ to sched/irq
2014-08-08 14:31:15 -06:00
Gregory Nutt
0f318e9249
Move watchdog functions from sched/ to sched/wdog
2014-08-08 14:21:48 -06:00
Gregory Nutt
4ff17b3904
Move group logic from sched/ to sched/group
2014-08-08 14:06:42 -06:00
Gregory Nutt
e10a23ae50
Move environment files from sched/ to sched/environ
2014-08-08 13:53:29 -06:00
Gregory Nutt
cb79407ced
Move all pthread files from sched/ to sched/pthread
2014-08-08 12:55:02 -06:00
Gregory Nutt
0385a00a60
Move signal-related files from sched/ to sched/signal
2014-08-08 12:44:44 -06:00
Gregory Nutt
08879ca34c
Move POSIX message queue files from sched/ to sched/mqueue
2014-08-08 12:31:23 -06:00
Gregory Nutt
5ee57bda59
Some final tickless OS bugfixes. No longer EXPERIMENTAL. Update some comments
2014-08-07 19:11:22 -06:00
Gregory Nutt
c9661ad5a7
Change all time conversions. Yech. New timer units in microseconds breaks all existing logic that used milliseconds in the conversions. Something likely got broken doing this, probably because I confused a MSEC2TICK conversion with a TICK2MSEC conversion. Also, the tickless OS no appears fully functional and passes the OS test on the simulator with no errors
2014-08-07 18:00:38 -06:00
Gregory Nutt
17ea50b45e
Fix compler error in tickless code when round robin scheduling is enabled. Other cosmetic fixes to comments
2014-08-07 14:14:09 -06:00
Gregory Nutt
0aa7209765
Change CONFIG_MSEC_PER_TICK to CONFIG_USEC_PER_TICK. This gives more options for system timers in general, but more importantly, let's us realize higher resolution for the case of CONFIG_SCHED_TICKLESS=y -- of course, at the risk of some new interger overvflow problems
2014-08-07 13:42:47 -06:00
Gregory Nutt
caba61999a
Remove CONFIG_DISABLE_CLOCK
2014-08-07 12:35:24 -06:00
Gregory Nutt
520a51a3e1
Implements the tickless OS
2014-08-07 11:39:16 -06:00
Gregory Nutt
aaafcfd688
if CONFIG_SCHED_TICKLESS is defined, then the global variable g_system_timer does not exist.
2014-08-06 18:29:05 -06:00
Gregory Nutt
a1ae9d36df
Don't build in sched_processtimer.c if CONFIG_SCHED_TICKLESS is selected.
2014-08-06 18:28:51 -06:00
Gregory Nutt
b0324c00ee
Uses interval timer interfaces to get the time if CONFIG_SCHED_TICKLESS is selected.
2014-08-06 18:28:08 -06:00
Gregory Nutt
a93fdc165d
Use the clock_systimer() macro, do access the g_system_timer() global directly.
2014-08-06 18:27:35 -06:00
Gregory Nutt
0452b1555b
if CONFIG_SCHED_TICKLESS is defined, then the global variable g_system_timer does not exist
2014-08-06 18:26:16 -06:00
Gregory Nutt
f0eb4235d1
Add a new option CONFIG_SCHED_TICKLESS to enable the tickless OS. This is a work in progress but should be relatively safe since the new features are only enabled by this option (Safer but not 100% safe since it does not protect from typos and other dumb errors).
2014-08-06 18:25:42 -06:00
Gregory Nutt
19abe47a6f
sem_wait: Use set_errno() and get_errno(). Direce access inside the OS may not be supported in the future.
2014-07-31 15:01:37 -06:00
Gregory Nutt
e3310888e2
Cosmet updates to some comments
2014-07-17 17:58:24 -06:00
Gregory Nutt
0da9aaeb09
Fix some recurring typos: postion->position, *atino->*ation
2014-07-08 13:12:36 -06:00
Gregory Nutt
3b81e58047
NET: Fix some errors in recent network I/O buffering when stack runs from interrupt level
2014-06-28 11:35:14 -06:00
Gregory Nutt
0daf30675c
Fix conditional compilation for CLOCK_MONTONIC. From Manuel Stühn
2014-06-23 11:01:31 -06:00
Gregory Nutt
90b82696ac
Move SAMA5D3 MPDDRC definitions to a separate header file
2014-06-10 08:11:31 -06:00
Gregory Nutt
4035ed8c6c
CONFIG_START_YEAR/MONTH/DAY not required if an RTC is used
2014-05-26 07:45:15 -06:00
Gregory Nutt
44a3397283
sig_mqnotempty(): Test for a valid signal number inverted. From eero.nurkkala
2014-05-20 07:38:43 -06:00
Gregory Nutt
84d28641b7
SAM4S Xplained Pro: Clean-up of LED usage and also some integration of new timer features. From Bob Doiron
2014-05-05 14:38:29 -06:00
Gregory Nutt
79d9e9cccd
If the CPU load measurements are being driven by an external clock, then the prototype for sched_process_cpuload() must be available in include/nuttx/arch.h
2014-04-30 15:47:55 -06:00
Gregory Nutt
8d758a13de
The CONFIG_SYSTEMTICK_EXTCLK selection should only be available on systems that support it
2014-04-30 15:32:06 -06:00
Gregory Nutt
f7485ea962
Updated system timer logic from Bob Doiron
2014-04-30 14:46:26 -06:00
Gregory Nutt
33ddbeab16
STM32: More places where up_prioritize_irq is called when CONFIG_ARCH_IRQPRIO is not defined. Sourceforge ticket #26
2014-04-28 07:07:47 -06:00
Gregory Nutt
1909c44f87
Minor updates to READMEs and comments
2014-04-27 11:38:24 -06:00
Gregory Nutt
ee86b7afb9
ZNeo: update calibration
2014-04-25 12:38:56 -06:00
Gregory Nutt
daf6d347fc
Updates to ZNeo configurations + misc cosmetic changes to comments
2014-04-25 11:59:17 -06:00
Gregory Nutt
61555fe5e1
Various SAM4S related fixes, mostely related to the timer driver driver and the SAM4S timer/counter. All from Bob Doisin
2014-04-22 09:01:20 -06:00
Gregory Nutt
a8cb0ad8f4
Add debug assertion on failure to allocate a watchdog
2014-04-21 19:16:12 -06:00
Gregory Nutt
3a1324741a
More trailing whilespace removal
2014-04-13 14:32:20 -06:00
Gregory Nutt
494387b33b
Make sure that there is one space after for
2014-04-12 13:28:22 -06:00
Gregory Nutt
056aed1274
Make sure that there is one space between while and condition
2014-04-12 13:09:48 -06:00
Gregory Nutt
c208b25f89
Add some checks: if getpid() or get_errno_ptr() are called very early in the initialization sequence, they would fail
2014-04-10 10:20:44 -06:00
Gregory Nutt
6be62a7ef3
configs/*/defconfig: Increase the number of pre-allocated watchdogs in configurations that use networking or USB
2014-04-09 10:57:56 -06:00
Gregory Nutt
cbdc9155ab
SAMA5: Add support for DBGU. Xplained board now uses DBGU for the serial console
2014-04-01 11:24:15 -06:00
Gregory Nutt
70815e5673
sched/Kconfig: Add another layer of menuing to simply this level
2014-03-31 11:32:22 -06:00
Gregory Nutt
4f59bc5878
Add CONFIG_CLOCK_MONTONIC
2014-03-31 10:01:03 -06:00
Gregory Nutt
8772a4e104
Add support for CLOCK_MONOTONIC. From Macs N
2014-03-31 09:25:50 -06:00