Oliver Brunner [Thu, 24 Oct 2013 07:29:51 +0000 (09:29 +0200)]
added automatic system spinlock unlocking and locking
Oliver Brunner [Thu, 24 Oct 2013 07:26:35 +0000 (09:26 +0200)]
renamed initspin to resetspin
Oliver Brunner [Wed, 23 Oct 2013 15:10:34 +0000 (17:10 +0200)]
- added initspin to reset a spin
- spins now work in very early boot conditions or during task removal, when ThisTask is NULL
Oliver Brunner [Mon, 21 Oct 2013 09:11:19 +0000 (11:11 +0200)]
retab
Oliver Brunner [Mon, 21 Oct 2013 08:11:15 +0000 (10:11 +0200)]
avoid possible race condition
Oliver Brunner [Mon, 21 Oct 2013 08:10:51 +0000 (10:10 +0200)]
retab
Oliver Brunner [Fri, 11 Oct 2013 10:00:51 +0000 (12:00 +0200)]
Avoid race condition. TDNest is already modified by the call itself.
Oliver Brunner [Fri, 4 Oct 2013 10:14:18 +0000 (12:14 +0200)]
better check ownership upfront
Oliver Brunner [Tue, 1 Oct 2013 11:51:23 +0000 (13:51 +0200)]
added one more check (Wanderer/ExecuteStartup sometimes triggers that on SMP systems)
Oliver Brunner [Tue, 1 Oct 2013 11:22:05 +0000 (13:22 +0200)]
- a spinlock is now a (private) "struct SpinLock"
- spinlocks can nest
- spinlocks must only be unlocked by the holding task
- spinlocks must only be unlocked, if they have been locked before
Oliver Brunner [Tue, 1 Oct 2013 11:15:19 +0000 (13:15 +0200)]
- fix shared semaphores: removed unneccessary, too early Unlocks
- smaller cleanups
Oliver Brunner [Tue, 1 Oct 2013 09:37:03 +0000 (11:37 +0200)]
retab
Oliver Brunner [Mon, 30 Sep 2013 09:35:35 +0000 (11:35 +0200)]
retab
Oliver Brunner [Thu, 26 Sep 2013 14:05:05 +0000 (16:05 +0200)]
ifdef -> if
Oliver Brunner [Thu, 26 Sep 2013 12:06:25 +0000 (14:06 +0200)]
Fix typo
Oliver Brunner [Thu, 26 Sep 2013 09:36:12 +0000 (11:36 +0200)]
Fix ETask check
Oliver Brunner [Thu, 26 Sep 2013 08:35:47 +0000 (10:35 +0200)]
retab
Oliver Brunner [Thu, 26 Sep 2013 08:34:32 +0000 (10:34 +0200)]
make semaphore functions use spinlocks (WIP)
Oliver Brunner [Thu, 26 Sep 2013 08:30:41 +0000 (10:30 +0200)]
retab
Oliver Brunner [Thu, 26 Sep 2013 08:24:41 +0000 (10:24 +0200)]
retab
Oliver Brunner [Thu, 26 Sep 2013 08:13:37 +0000 (10:13 +0200)]
retab
Oliver Brunner [Thu, 26 Sep 2013 08:04:50 +0000 (10:04 +0200)]
only reset taskpriority, if it has been changed before.
Oliver Brunner [Wed, 25 Sep 2013 14:37:28 +0000 (16:37 +0200)]
retab
Oliver Brunner [Wed, 25 Sep 2013 14:27:56 +0000 (16:27 +0200)]
New exec functions LockSpin and UnlockSpin
Oliver Brunner [Wed, 25 Sep 2013 07:32:16 +0000 (09:32 +0200)]
ETask structure might already be uninitialized. Not sure, if the fix is correct.
Jason S. McMullan [Thu, 22 Aug 2013 17:50:58 +0000 (13:50 -0400)]
SMP: Make 'THISCPU' a private convenience macro for kernel.resource and exec.library
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Thu, 22 Aug 2013 01:58:11 +0000 (21:58 -0400)]
kernel.resource: Fix glaringly obvious typo
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Thu, 22 Aug 2013 01:57:48 +0000 (21:57 -0400)]
smp: Move SysFlags/SFF_SoftInt to ExecCPUInfo
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Michal Schulz [Wed, 21 Aug 2013 13:52:41 +0000 (15:52 +0200)]
Ignore "Builds" directory
Jason S. McMullan [Wed, 21 Aug 2013 17:11:48 +0000 (13:11 -0400)]
arch/m68k-*: SMP fixes
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 21 Aug 2013 17:11:31 +0000 (13:11 -0400)]
Calculator: compiler delint (m68k)
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 21 Aug 2013 17:11:16 +0000 (13:11 -0400)]
radeon.hidd: Compiler delint
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 21 Aug 2013 17:11:01 +0000 (13:11 -0400)]
kernel.resource: Fix Uniprocessor build
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 21 Aug 2013 17:10:44 +0000 (13:10 -0400)]
exec.library: Fix typo for m68k
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 21 Aug 2013 17:10:19 +0000 (13:10 -0400)]
arch/all-pc: Bootstrap compiler delint
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 21 Aug 2013 13:56:59 +0000 (09:56 -0400)]
exec.library: Fix missing header for uniprocessor builds
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 21 Aug 2013 13:56:42 +0000 (09:56 -0400)]
kernel.resource: Fix some SMP stub compilation issues
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 21 Aug 2013 13:55:50 +0000 (09:55 -0400)]
configure: Move aros_smp definition to the correct location
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 21 Aug 2013 04:30:36 +0000 (00:30 -0400)]
arch/all-unix: Use default KrnGetCPUCount() implementation
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 21 Aug 2013 04:18:37 +0000 (00:18 -0400)]
exec.library: Use a global TaskReady/TaskWait list
Nice side effect - the first ready processor will self-assign
the CPU affinity of a Ready task.
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 21 Aug 2013 04:08:53 +0000 (00:08 -0400)]
exec.library: Add some paranoia to RemTask()
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 21 Aug 2013 03:58:31 +0000 (23:58 -0400)]
exec.library: No need to 'save and restore' TDNestCnt
Switch and Dispatch already take care of that for us.
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 21 Aug 2013 03:54:30 +0000 (23:54 -0400)]
exec.library: Move 'Quantum' back to SysBase
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 21 Aug 2013 03:49:22 +0000 (23:49 -0400)]
arch/all-unix: Remove unneeded 'storage' variable
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 21 Aug 2013 03:47:38 +0000 (23:47 -0400)]
arch/all-unix: Remove custom getcpucount
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 21 Aug 2013 03:43:14 +0000 (23:43 -0400)]
arch/all-unix: Fix implementation of KrnCause() for SMP
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 21 Aug 2013 03:41:34 +0000 (23:41 -0400)]
arch/all-unix: Don't use SC_ENABLE/SC_DISABLE macros on SMP
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 21 Aug 2013 03:19:05 +0000 (23:19 -0400)]
kernel.resource: KrnGetCPUCount() - reasonable default implementation
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Sun, 18 Aug 2013 02:07:38 +0000 (22:07 -0400)]
gdbinit: Fixes for hosted
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 21 Aug 2013 03:15:07 +0000 (23:15 -0400)]
arch/all-unix: Add counting semaphore primitive
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Fri, 16 Aug 2013 04:13:17 +0000 (00:13 -0400)]
arch/all-unix: Disable interrupts *after* all tasks have halted
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Fri, 16 Aug 2013 04:12:27 +0000 (00:12 -0400)]
arch/all-unix: Better obey pthread rules for cond variables
cond_wait and cond_signal/broadcast cannot be used in the
same mutex lock block.
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Fri, 16 Aug 2013 04:10:02 +0000 (00:10 -0400)]
exec.library: Add a few paranoia NULLs to remtask
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Fri, 16 Aug 2013 04:09:25 +0000 (00:09 -0400)]
exec.library: Remove (very obsolete) check for FreeMem(FindTask(NULL))
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Fri, 16 Aug 2013 04:04:31 +0000 (00:04 -0400)]
arch/all-unix: Fix Forbid() breaking in cpu_Dispatch()
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Thu, 15 Aug 2013 03:44:51 +0000 (23:44 -0400)]
arch/all-unix: Simplify Cli/Sti behaviour
The KrnSchedule() mechanism tasks care of stopping processes - all
we really need is CPU0 to ignore SIGALRM/SIGIO interrupts.
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Thu, 15 Aug 2013 03:43:43 +0000 (23:43 -0400)]
arch/all-unix: Implement new KrnSchedule() API
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Thu, 15 Aug 2013 03:41:32 +0000 (23:41 -0400)]
arch/all-unix: Fix KrnSupervisor() being stuck
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Thu, 15 Aug 2013 03:41:03 +0000 (23:41 -0400)]
exec.library: NewAddTask() wasn't properly coping with ThisTask == NULL
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Thu, 15 Aug 2013 03:40:33 +0000 (23:40 -0400)]
exec.library: Use new KrnSchedule() API
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Thu, 15 Aug 2013 03:38:30 +0000 (23:38 -0400)]
kernel.resource: Add some minor paranoia into the scheduler for SMP
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Thu, 15 Aug 2013 03:38:00 +0000 (23:38 -0400)]
kernel.resource: Change KrnSchedule() interface (again)
The intent is that SysBase->TDNestCnt is simply a cached
copy of the kernel's internal forbid counter, and all
management of that (locked) internal counter is through
the kernel.resource API
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Thu, 15 Aug 2013 03:34:23 +0000 (23:34 -0400)]
arch/all-unix: Move 'HAVE_SWAPCONTEXT' into exec_platform.h
Discovered that having it in mmakefile caused items after
IntExecBase->PlatformData to move around, since the define
was not in the regular rom/exec build
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Fri, 16 Aug 2013 03:53:30 +0000 (23:53 -0400)]
exec.library: Leave ExecBase the same size, whether SMP or not
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Michal Schulz [Wed, 14 Aug 2013 20:57:29 +0000 (22:57 +0200)]
Give a warning (it should be crash!!!!) when TDNestCnt wraps...
Michal Schulz [Wed, 14 Aug 2013 20:33:53 +0000 (22:33 +0200)]
use old method of selecting CPU. Temporary fix
Michal Schulz [Wed, 14 Aug 2013 20:33:23 +0000 (22:33 +0200)]
be less verbose
Michal Schulz [Wed, 14 Aug 2013 20:21:54 +0000 (22:21 +0200)]
oops, forgot one condition in permit
Michal Schulz [Wed, 14 Aug 2013 20:13:42 +0000 (22:13 +0200)]
KrnScheduling takes an BYTE parameter and then behaves accordingly:
parameter > 0 <-- TDNestCnt++, then stop multitasking and stop all other cores if SysBase->TDNestCnt >= 0
parameter < 0 <-- TDNestCnt--, then enable multitasking and enable all other cores if SysBase->TDNestCnt < 0
parameter = 0 <-- don't change TDNestCnt, just test it and stop or enable multitasking
Michal Schulz [Wed, 14 Aug 2013 18:52:07 +0000 (20:52 +0200)]
Include CPU number in debug output
Michal Schulz [Wed, 14 Aug 2013 18:50:58 +0000 (20:50 +0200)]
"empty" or "free" cpu is a cpu without ready and without waiting tasks. If any of these is not the case, simple picking of CPU cannot be done
Jason S. McMullan [Wed, 14 Aug 2013 04:22:05 +0000 (00:22 -0400)]
arch/all-unix: Work in progress, attempt to use pthread conditional variables for Forbid/Permit
Not yet functional.
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 14 Aug 2013 04:20:28 +0000 (00:20 -0400)]
arch/all-unix: Use pthread thread-specific storage for CPU Number and Storage
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 14 Aug 2013 04:19:03 +0000 (00:19 -0400)]
exec.library: Remove unneeded Enable() in SMP init
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 14 Aug 2013 04:18:40 +0000 (00:18 -0400)]
exec.library: Use KrnSchedule() hook
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 14 Aug 2013 04:18:19 +0000 (00:18 -0400)]
kernel.resource: Add KrnSchedule() hook
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Wed, 14 Aug 2013 04:17:50 +0000 (00:17 -0400)]
exec.library: Fix issue where FreeMem()'d tasks were still referenced
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Michal Schulz [Tue, 13 Aug 2013 19:32:38 +0000 (21:32 +0200)]
when picking up semi-random CPU, actually assign the task to it. Until now iteration through cpus was done, but assignment missed...
Michal Schulz [Tue, 13 Aug 2013 17:45:02 +0000 (19:45 +0200)]
fixed typo
Michal Schulz [Tue, 13 Aug 2013 17:31:54 +0000 (19:31 +0200)]
Don't use ThisTask from SysBase. Call FindTask(NULL) instead.
Jason S. McMullan [Tue, 13 Aug 2013 00:57:53 +0000 (20:57 -0400)]
arch/all-unix: SMP fix - add pthread_cond_broadcast, remove malloc/alloc
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Mon, 12 Aug 2013 04:30:52 +0000 (00:30 -0400)]
arch/all-unix: Use pthreads to implement SMP
usage:
AROSBootstrap --cpus N
If N > 1, then you will be running in SMP mode.
The 'CPU0' thread handles all external signals,
SIGUSR1, and SIGUSR2.
All other threads use SIGURG for 'irq' style signals, and
SIGSYS for 'syscall' style signals.
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Sun, 11 Aug 2013 23:21:12 +0000 (19:21 -0400)]
SMP: Infrastructure for AROS SMP support
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Sat, 10 Aug 2013 15:59:49 +0000 (11:59 -0400)]
AROSTCP: Use Exec/ScanTasks()
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Sat, 10 Aug 2013 15:58:35 +0000 (11:58 -0400)]
C:TaskList - use Exec/ScanTasks()
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Sat, 10 Aug 2013 15:58:12 +0000 (11:58 -0400)]
C:StackSnoop: Use Exec/ScanTasks()
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Sat, 10 Aug 2013 15:57:31 +0000 (11:57 -0400)]
bootstrap: Add KRN_MaxCPUs SMP parameter
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Fri, 9 Aug 2013 19:40:20 +0000 (15:40 -0400)]
SMP: Don't use SysBase->ThisTask outside of kernel.library & exec.library
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Sat, 10 Aug 2013 14:17:42 +0000 (10:17 -0400)]
exec.library: Add ScanTasksA()
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Jason S. McMullan [Fri, 9 Aug 2013 20:46:55 +0000 (16:46 -0400)]
SMP: Don't use SysBase->ThisTask outside of kernel.library & exec.library
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
jmcmullan [Wed, 21 Aug 2013 13:59:21 +0000 (13:59 +0000)]
diskimage.device: On ABIv1, all Nodes are AROS_FLAVOUR_BINCOMPAT style
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
git-svn-id: https://svn.aros.org/svn/aros/trunk@47832
fb15a70f-31f2-0310-bbcc-
cdcc74a49acc
jmcmullan [Wed, 21 Aug 2013 13:59:15 +0000 (13:59 +0000)]
arosc.library: Compiler delint
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
git-svn-id: https://svn.aros.org/svn/aros/trunk@47831
fb15a70f-31f2-0310-bbcc-
cdcc74a49acc
jmcmullan [Wed, 21 Aug 2013 13:59:10 +0000 (13:59 +0000)]
ata.device: 64-bit cleanliness compiler delint
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
git-svn-id: https://svn.aros.org/svn/aros/trunk@47830
fb15a70f-31f2-0310-bbcc-
cdcc74a49acc
NicJA [Tue, 20 Aug 2013 18:51:45 +0000 (18:51 +0000)]
typo..
git-svn-id: https://svn.aros.org/svn/aros/trunk@47829
fb15a70f-31f2-0310-bbcc-
cdcc74a49acc
NicJA [Mon, 19 Aug 2013 22:47:02 +0000 (22:47 +0000)]
allow building moduls with .cxx files
git-svn-id: https://svn.aros.org/svn/aros/trunk@47828
fb15a70f-31f2-0310-bbcc-
cdcc74a49acc
verhaegs [Sun, 18 Aug 2013 22:22:05 +0000 (22:22 +0000)]
test/clib/mmakefile.src:
* Compiling argv0_slave_nixc did not compile as intended
* Use nix parameter for %build_progs
* Included forgotten files
git-svn-id: https://svn.aros.org/svn/aros/trunk@47827
fb15a70f-31f2-0310-bbcc-
cdcc74a49acc
verhaegs [Sun, 18 Aug 2013 14:02:53 +0000 (14:02 +0000)]
contrib/regina/options.c: CALLS_AS_FUNS->CALLS_AS_FUNCS
Good catch by Olivier Tigreat
git-svn-id: https://svn.aros.org/svn/aros/trunk@47826
fb15a70f-31f2-0310-bbcc-
cdcc74a49acc
verhaegs [Sun, 18 Aug 2013 12:22:54 +0000 (12:22 +0000)]
compiler/clib/system.c: Set SYS_Error of child to BNULL is stderr==stdout
git-svn-id: https://svn.aros.org/svn/aros/trunk@47825
fb15a70f-31f2-0310-bbcc-
cdcc74a49acc
verhaegs [Sun, 18 Aug 2013 12:22:49 +0000 (12:22 +0000)]
compiler/clib/__fdesc.c: Duplicate DOS handles for stdio streams if possible
Previously prompt of AmigaShell could be corrupted when running clib
programs in it. This should be fixed.
git-svn-id: https://svn.aros.org/svn/aros/trunk@47824
fb15a70f-31f2-0310-bbcc-
cdcc74a49acc
verhaegs [Sun, 18 Aug 2013 12:22:44 +0000 (12:22 +0000)]
compiler/clib/__fdesc.c: Typo
git-svn-id: https://svn.aros.org/svn/aros/trunk@47823
fb15a70f-31f2-0310-bbcc-
cdcc74a49acc