Commit Graph

6015 Commits

Author SHA1 Message Date
Pawel Dziepak
73db12ab31 kernel: Align user_thread objects to CACHE_LINE_SIZE 2014-01-20 03:22:04 +01:00
Alexander von Gluck IV
88c54b5485 kernel: Rework ppc (and m68k) atomic functions post-scheduler
* Make atomic function more like current x86
* Remove fake fallback atomic code for ppc as hardware spinlocks exist
2014-01-19 19:33:21 -06:00
Pawel Dziepak
cf87df8ba3 libroot: Fix gcc2 build 2014-01-20 00:54:52 +01:00
Pawel Dziepak
25dcdbc2b5 libroot: Avoid conflicts with legacy CPU and platform enums 2014-01-20 00:32:57 +01:00
Pawel Dziepak
9d80738d95 kernel: Fix NULL dereference in has_permission_to_signal 2014-01-19 19:35:13 +01:00
Ingo Weinhold
8540ec2446 Save previous session's debug syslog during boot
Add boot loader debug menu option "Save syslog from previous session
during boot". If enabled (defaults to true), the previous session's
debug syslog data is copy to a separate buffer and passed to the
kernel, which writes it back to the file /var/log/previous_syslog.
As long as Haiku still boots, this should now be the most convenient way
to retrieve the output from a kernel crash.
2014-01-19 10:46:00 +01:00
Pawel Dziepak
955e4cff94 scheduler: Weaken time slept assertion 2014-01-17 18:07:47 +01:00
Pawel Dziepak
d0f2d8282f Merge branch 'scheduler'
Conflicts:
	build/jam/packages/Haiku
	headers/os/kernel/OS.h
	headers/os/opengl/GLRenderer.h
	headers/private/shared/cpu_type.h
	src/add-ons/kernel/drivers/power/acpi_battery/acpi_battery.h
	src/bin/sysinfo.cpp
	src/bin/top.c
	src/system/kernel/arch/x86/arch_system_info.cpp
	src/system/kernel/port.cpp
2014-01-17 04:06:15 +01:00
Pawel Dziepak
0269dd284e Revert "scheduler: SCHEDULER_EXIT_FUNCTION() is not needed"
This reverts commit 667617ad043a4587d8d366d5192d9ad291cfa37a.

Scheduler profiler uses CPU local data to store function information, hence
arch_thread_context_switch() usually is not a problem. However, when
we switch to a new thread we end up scheduler_new_thread_entry() instead
of scheduler_reschedule() what may corrupt data collected by the profiler.
2014-01-17 01:55:42 +01:00
Pawel Dziepak
3dce49af0e scheduler: Cache quantum length 2014-01-17 01:55:42 +01:00
Pawel Dziepak
4835c216f7 scheduler: low_latency: Try to keep all cores busy 2014-01-17 01:55:42 +01:00
Pawel Dziepak
0d27a57cf1 scheduler: Fix divide by zero on CPU disable 2014-01-16 23:26:10 +01:00
Pawel Dziepak
f978518a52 scheudler: Cache ThreadData::IsCPUBound() result 2014-01-16 23:26:10 +01:00
Pawel Dziepak
b7d404c2df scheduler: Add ThreadData::{GetPriority, IsIdle, IsRealTime}() 2014-01-16 23:26:09 +01:00
Pawel Dziepak
093c220267 scheduler: Improve latencies 2014-01-16 23:26:09 +01:00
Pawel Dziepak
7f212f45c3 scheduler: Update used time when thread yields or sleeps 2014-01-16 23:26:09 +01:00
Pawel Dziepak
dd8a866adc libroot/x86: Fix indirect jump 2014-01-16 20:18:22 +01:00
Pawel Dziepak
79c9b824e4 libroot: sync() should not return any value 2014-01-16 20:18:22 +01:00
Jonathan Schleifer
9fc69d1b00 runtime_loader: Add __dso_handle.
The symbol is needed for global objects. Usually, GCC also requires
this, but for some reason, the linking error only occurs when using
Clang.

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2014-01-13 19:35:34 +01:00
Jonathan Schleifer
d1c7f766fd glibc: Remove a ++ that was accidentally added.
Thanks to PulkoMandy for noticing!

Work towards bug #10396
2014-01-11 17:33:42 -06:00
Alexander von Gluck IV
4f357bc071 sysinfo: Improve x86 CPU information
* Displays standard CPUID, and shows what the
  internal CPUID used by OS.h *should* be.
* Should help out in identifying new CPU's
  as all end users have to do is run sysinfo
  to get the CPU info + value for OS.h
2014-01-11 16:14:22 -06:00
Jonathan Schleifer
38fee4c388 glibc: Remove nested function.
Nested functions are a (again, broken) GNU extension which is not
supported by Clang. It has been replaced by a bunch of gotos and a
variable that works as a return address.
2014-01-10 22:32:05 +01:00
Jonathan Schleifer
4683fcc35c glibc: Correctly create weak symbols. 2014-01-10 22:31:58 +01:00
Pawel Dziepak
082d3c1015 scheduler: Increase thread penalty at fork 2014-01-09 03:50:54 +01:00
Pawel Dziepak
a2634874ed scheduler: Estimate the load thread is able to produce
Previous implementation based on the actual load of each core and share
each thread has in that load turned up to be very problematic when
balancing load on very heavily loaded systems (i.e. more threads
consuming all available CPU time than there is logical CPUs).

The new approach is to estimate how much load would a thread produce
if it had all CPU time only for itself. Summing such load estimations
of each thread assigned to a given core we get a rank that contains
much more information than just simple actual core load.
2014-01-09 03:50:54 +01:00
Pawel Dziepak
772331c7cd scheduler: Introduce strong and weak priority penalties 2014-01-08 07:16:19 +01:00
Pawel Dziepak
d36098e043 scheduler: Keep track of the number of the ready threads 2014-01-08 05:05:25 +01:00
Pawel Dziepak
9c465cc83b scheduler: Improve recognition of CPU bound threads 2014-01-08 05:05:25 +01:00
Alexander von Gluck IV
aa4b5749d6 runtime_loader: Detect and trigger on PE binaries
* Previously PE binaries would trigger the "incorrectly
  executable" dialog. Now we get a special message for
  B_LEGACY_EXECUTABLE and B_UNKNOWN_EXECUTABLE
* Legacy at the moment is a R3 x86 PE binary. This could
  be extended to gcc2 binaries someday far, far, down the
  road though
* The check for legacy is based on a PE flag I see
  set on every R3 binary (that isn't set on dos ones)
* Unknown is something we know *is* an executable, but
  can't do anything with (such as an MSDOS or Windows
  application)
* No performance drops as we do the PE scan last
* Tested on x86 and x86_gcc2
2014-01-07 19:38:07 -06:00
Pawel Dziepak
c2a02dee65 kernel: Relax cpu_ent::interrupt_time locking
The value isn't accessed by the other CPUs and all writes and reads are
done with interrupts disabled.
2014-01-07 02:12:39 +01:00
Pawel Dziepak
c37c2aa45f scheduler: Improve should_rebalance 2014-01-07 01:11:42 +01:00
Pawel Dziepak
4ca31ac964 kernel: Fix ABA problem in try_acquire_read_spinlock() 2014-01-06 21:03:42 +01:00
Pawel Dziepak
bae6d7196a scheduler: Fix SchedulerModeLocker 2014-01-06 09:08:53 +01:00
Pawel Dziepak
a5f45afa6c scheduler: Remove unnecessary check against disabled CPU 2014-01-06 09:08:53 +01:00
Pawel Dziepak
8cf8e53774 kernel/x86: Inline atomic functions and memory barriers 2014-01-06 09:08:53 +01:00
Pawel Dziepak
8235bbc996 scheduler: Improve thread creation performance 2014-01-06 01:22:53 +01:00
Pawel Dziepak
cb66faef24 scheduler: Work around GCC2 limitations in function inlining
GCC2 won't inline a function if it is used before its definition.
2014-01-06 01:22:53 +01:00
Pawel Dziepak
9e99bf6085 scheduler: SCHEDULER_EXIT_FUNCTION() is not needed 2014-01-03 20:15:13 +01:00
Pawel Dziepak
81e04d7b97 kernel: Remove cpu_info::load
This field forces kernel to track each CPU load all the time. It is not
a problem with the current scheduler on a multicore systems, but on
single core machnies or with any other future scheduler this field may
become just an unnecessary burden. It isn't difficult for an application
to compute CPU load by itself when it needs it.
2014-01-03 19:44:57 +01:00
Pawel Dziepak
e4ea637227 scheduler: Disable load tracking when not needed 2014-01-03 19:44:56 +01:00
Pawel Dziepak
db1ddabfd0 scheduler: Thread can not stay on CPU if it has been disabled 2013-12-31 04:49:45 +01:00
Pawel Dziepak
2d52abbd5d scheduler: Inherit penalty and core from creator thread 2013-12-31 03:53:55 +01:00
Pawel Dziepak
7c92dffeef scheduler: Fix order of the includes
Thanks Jérôme!
2013-12-31 03:53:55 +01:00
Pawel Dziepak
265927509d scheduler: Protect per CPU run queue with its own lock 2013-12-31 03:53:55 +01:00
Pawel Dziepak
1524fbf742 scheduler: Fix divide error in _RequestPerformanceLevel 2013-12-30 06:10:14 +01:00
Pawel Dziepak
046af755d0 x86: Fix stack corruption in cache topology detection 2013-12-30 06:10:14 +01:00
Pawel Dziepak
8aa1539bb0 scheduler: Strengthen CoreEntry::GetLoad() assertion 2013-12-30 06:10:14 +01:00
Pawel Dziepak
15a7f2046a kernel: Return CPU load in cpu_info 2013-12-29 22:47:06 +01:00
Pawel Dziepak
56c0f467b0 scheduler: Fix unused variable warnings 2013-12-29 22:47:05 +01:00
Pawel Dziepak
a47974dd06 scheduler: Use heap to determine highest priority thread 2013-12-29 19:24:01 +01:00
Pawel Dziepak
484e5c737f scheduler: profiler: Compare types larger than int properly 2013-12-29 19:19:21 +01:00
Pawel Dziepak
ef8e55a1d0 scheduler: Use single ended heap for CPU heap 2013-12-28 21:47:35 +01:00
Pawel Dziepak
712f37e19e scheduler: profiler: Use nanosecond as a main time unit 2013-12-28 21:03:43 +01:00
Pawel Dziepak
ca9137de37 scheduler: Profile RunQueue implementation 2013-12-28 20:46:22 +01:00
Pawel Dziepak
4c25fcab38 scheduler: Fix double release of run queue lock 2013-12-28 20:11:30 +01:00
Pawel Dziepak
f68a486001 scheduler: Ignore time used by the profiler implementation 2013-12-28 18:55:39 +01:00
Pawel Dziepak
65d28952ae scheduler: Make sure RunQueueLink::{fPrevious, fNext} are valid 2013-12-26 22:07:26 +01:00
Pawel Dziepak
335c60552c scheduler: Remove CPUEntry::IncreaseActiveTime() 2013-12-26 19:56:50 +01:00
Pawel Dziepak
9a6868d565 x86: Fix build with kernel debugging disabled 2013-12-26 19:55:33 +01:00
Pawel Dziepak
96dcc73b39 scheduler: Add scheduler profiler
A bit hackish implementation of a profiler for the scheduler.
SCHEDULER_ENTER_FUNCTION at the begining of each function aren't nice and
usage of __PRETTY_FUNCTION__ isn't any better (both gcc and clang support
it though), but it was quick to implement and doesn't lose information
on inlined functions. It's just a tool, not an integral part of the kernal
anyway.
2013-12-26 19:40:50 +01:00
Pawel Dziepak
ebe5420f84 scheduler: No need for gQuantumLengths to be global 2013-12-26 19:40:50 +01:00
Pawel Dziepak
cf4984f645 scheduler: Use precomputed time slice lengths 2013-12-23 22:49:12 +01:00
Pawel Dziepak
ede552ab25 scheduler: Keep thread effective priority cached 2013-12-23 22:06:33 +01:00
Pawel Dziepak
b24ea642d7 scheduler: Encapsulate ThreadData fields 2013-12-23 21:32:21 +01:00
Pawel Dziepak
a08b40d408 scheduler: Encapsulate CPUEntry fields 2013-12-23 20:15:16 +01:00
Pawel Dziepak
e1e7235c60 scheduler: Encapsulate CoreEntry fields 2013-12-23 18:27:10 +01:00
Pawel Dziepak
5a69ffc01e scheduler: Remove RunQueue::PeekSecondMaximum() 2013-12-23 03:51:02 +01:00
Pawel Dziepak
60e198f2cb scheduler: Encapsulate PackageEntry fields
Apart from the refactoring this commit takes the opportunity and removes
unnecessary read locks when choosing a package and a core from idle lists.
The data structures are accessed in a thread safe way and it does not really
matter whether the obtained data becomes outdated just when we release the
lock or during our search for the appropriate package/core.
2013-12-23 00:56:44 +01:00
Pawel Dziepak
cf21c40b50 x86: Fix style
Thanks Axel.
2013-12-23 00:09:03 +01:00
Pawel Dziepak
b89b5d3826 x86: Make arch/smp.h a C++ only header 2013-12-20 22:05:26 +01:00
Pawel Dziepak
9116eec24c scheduler: Allow calling UpdatePriority() for disabled CPU 2013-12-20 05:40:59 +01:00
Pawel Dziepak
b4552fcf9b x86: Remove debug message 2013-12-20 05:40:59 +01:00
Pawel Dziepak
73363f8dde kernel/vm: Fix unsigned/signed comparison warning 2013-12-20 05:40:59 +01:00
Pawel Dziepak
c08ed2db65 scheduler: Try to keep thread on the same logical CPU
Some SMT implementations (e.g. recent AMD microarchitectures) have
separate L1d cache for each SMT thread (which AMD decides to call "cores").
This means that we shouldn't move threads to another logical processor too
often even if it belongs to the same core. We aren't very strict about
this as it would complicate load balancing, but we try to reduce unnecessary
migrations.
2013-12-20 03:36:01 +01:00
Pawel Dziepak
ad6b9a1df8 scheduler: Use sequential locks instead of atomic 64 bit access 2013-12-20 02:18:44 +01:00
Pawel Dziepak
b258298c70 kernel: Protect cpu_ent::active_time with sequential lock
atomic_{get, set}64() are problematic on architectures without 64 bit
compare and swap.
Also, using sequential lock instead of atomic access ensures that
any reads from cpu_ent::active_time won't require any writes to shared
memory.
2013-12-20 01:31:32 +01:00
Pawel Dziepak
6639514437 x86[_64]: Support assigning MSI IRQs to arbitrary CPU 2013-12-20 01:07:08 +01:00
Pawel Dziepak
3add52e8ba kernel: Fix topology node count being decreased twice per node 2013-12-19 20:24:34 +01:00
Pawel Dziepak
e3d001ff02 x86: Implement multicast ICIs 2013-12-19 19:35:44 +01:00
Jonathan Schleifer
e3e0255008 rootfs.cpp: Replace undefined behaviour with offsetof.
Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2013-12-19 01:52:33 +01:00
Jonathan Schleifer
c7cb9b2f59 delete_driver_settings.cpp: Get rid of the weak alias.
As weak aliases are not supported on OS X, this caused problems when
building Haiku on OS X, as this file is also used for the host tools.

Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2013-12-19 01:52:33 +01:00
Pawel Dziepak
5a7289d720 scheduler: Fix unassigning threads from core being disabled 2013-12-18 00:03:56 +01:00
Pawel Dziepak
1b06228f13 kernel: Propagate scheduler modes to cpu{freq, idle} modules 2013-12-17 23:26:37 +01:00
Pawel Dziepak
4fcbac58de kernel: Make get_cpu_topology() return a pointer to const
The client code is not supposed to change the topology info.
It would be also nice if cpu_topology_node::children was an array of
pointers to const but that would require several const_casts in the
topology tree generation code so it's probably not worth it.
2013-12-17 22:08:18 +01:00
Pawel Dziepak
735f67481f x86: Debugger can now use dr3 2013-12-17 04:31:29 +01:00
Pawel Dziepak
a5b070f1fa x86: Store pointer to the current thread in gs:0
Apparently, reading from dr3 is slower than reading from memory
with cache hit.

Also, depending on hypervisor configuration, accessing dr3 may cause
a VM exit (and, at least on kvm, it does), what makes it much slower
than a memory access even when there is a cache miss.
2013-12-17 04:08:51 +01:00
Pawel Dziepak
611376fef7 x86: Let each CPU have its own GDT 2013-12-17 03:57:20 +01:00
Pawel Dziepak
d02aaee17e kernel, libroot: Add more memory info in system_info
system_info now contains all information previously available only
through __get_system_info_etc(B_MEMORY_INFO, ...).
2013-12-16 04:53:46 +01:00
Pawel Dziepak
1bc7045fdf kernel, libroot: Introduce new API for obtaining system info 2013-12-16 03:58:43 +01:00
Pawel Dziepak
8cf2f36c37 libroot: Fix Hoard when the CPU count is not a power of two 2013-12-12 21:14:25 +01:00
Pawel Dziepak
82727571c3 libroot: Fix uninitialized counter in mutex_lock() 2013-12-12 04:00:56 +01:00
Pawel Dziepak
53aac05ee5 libroot: Add prototypes for __{get,set}_scheduler_mode 2013-12-12 03:56:33 +01:00
Pawel Dziepak
02749e2429 x86/paging: Do not use array placement new
Array placement new has implementation defined memory overhead what
makes it pretty useless.
2013-12-11 01:59:31 +01:00
Ingo Weinhold
781671ad5b dump_mapping_info(): Remove problematic initializer
Fixes gcc 2 build.
2013-12-10 23:17:43 +01:00
Ingo Weinhold
c259766f94 KDL "mapping" command: Allow specifying a thread ID
... instead of only a team ID.
2013-12-10 19:13:56 +01:00
Ingo Weinhold
5d3978dbe7 KDL "mapping" command: Fix argument check
It wasn't possible to actually specify the second argument (team ID).
2013-12-10 19:13:08 +01:00
Ingo Weinhold
a3fe978f8a boot loader: Always show 4 GB memory limit safemode option
On x86 we mainly want to disable PAE, which is now also used with less
memory as long as NX support is available. Ideally we'd check this
condition as well and only add the menu item, if the kernel would
enable PAE.
2013-12-10 19:12:16 +01:00
Ingo Weinhold
fc7801bc6f boot loader: apply_boot_settings(): Replace string literal 2013-12-10 19:08:07 +01:00
Ingo Weinhold
647b768f54 x86: Disable PAE, if 4 GB memory limit safemode is set 2013-12-10 19:07:01 +01:00
Ingo Weinhold
9bdb5e0a92 kernel safemode: Add functions to get options early
Add get_safemode_option_early() and get_safemode_boolean_early() to get
safemode options before the kernel heap has been initialized. They use a
simplified parser.
2013-12-10 19:05:47 +01:00
François Revol
e36ad522d6 Fix 24d0e21f51 correctly
CreateSubRequest() could still return an error and break out of the
while loop without exiting the outer for loop.

Instead we reset the error code before entering the for loop.
2013-12-08 11:34:07 +01:00
François Revol
664e3fba9b Partially revert 24d0e21f51
This reverts the extra for loop condition from
"do_iterative_fd_io_iterate(): Support sparse files".

When reading a file with more than 8 block_runs, get_vecs() would
return B_BUFFER_OVERFLOW which would never create any subrequest due
to the test on error == B_OK on the loop, but instead just fail.

Except for the get_vecs() return code, where it is not wanted,
the test made no sense as all other assignments are tested directly
or passed around with break.

Works for me but I don't guarantee it's completely correct.
2013-12-08 01:43:02 +01:00
Ingo Weinhold
00b42dde0d FD kernel tracing: Capture kernel-only stack traces
* When exec()'ing we'd otherwise get (harmless but annoying) messages
  from vm_page_fault(). With syscall tracing enabled we can get userland
  stack traces anyway.
* Simplify by using TRACE_ENTRY_SELECTOR().
2013-12-07 15:44:22 +01:00
Ingo Weinhold
0a4cbd786c X86VMTranslationMapPAE: Extend kernel tracing
* Beside the physical address also print the PTE flags.
* Also trace Protect(), ClearFlags(), ClearAccessedAndModified().
2013-12-07 15:44:22 +01:00
Ingo Weinhold
3c70914f66 ktracing: TraceOutput::PrintStackTrace(): Fix duplication 2013-12-07 15:44:22 +01:00
Michael Lotz
57d8dd92ef pthread_join: Retry when interrupted as mandated by POSIX.
The spec explicitly states that pthread_join shall not return EINTR, so
we have to retry the wait when it gets interrupted instead of letting
the error code through.
2013-12-07 14:15:05 +00:00
Pawel Dziepak
bcfdf88186 apps, kernel: Remove B_MAX_CPU_COUNT 2013-12-06 21:57:58 +01:00
Pawel Dziepak
fd96cf08a7 libroot: Remove _SC_NPROCESSORS_MAX and _SC_CPUID_MAX
_SC_NPROCESSORS_MAX and _SC_CPUID_MAX appear to be supported only by
Solaris. There isn't much point in exposing such values to the userland
anyway.
2013-12-06 21:54:07 +01:00
Pawel Dziepak
f6b71d5518 libroot/malloc: Do not use B_MAX_CPU_COUNT 2013-12-06 21:05:05 +01:00
Pawel Dziepak
3106f832a9 kernel/smp: Fix warning 2013-12-06 19:57:04 +01:00
Pawel Dziepak
e6ea745e81 kernel: Use SMP_MAX_CPUS instead of B_MAX_CPU_COUNT 2013-12-06 19:53:56 +01:00
Pawel Dziepak
3e0e3be760 boot, kernel: Replace MAX_BOOT_CPUS with SMP_MAX_CPUS 2013-12-06 19:43:08 +01:00
Ingo Weinhold
dac7b7c980 Fix various 64 bit related warnings
Mostly printf() format strings and signed-unsigned comparisons.
Fixes the x86_64 build.
2013-12-06 14:17:58 +01:00
Pawel Dziepak
2b04d8ab31 x86/paging: Use CPUSet instead of cpu_mask_t 2013-12-06 03:27:48 +01:00
Pawel Dziepak
e052b3e630 x86/paging: Remove unusued local variable 2013-12-06 03:11:42 +01:00
Pawel Dziepak
5c7f09c4d7 kernel/util: Bitmap: Silence warning 2013-12-06 03:10:50 +01:00
Pawel Dziepak
7629d527c5 kernel: Use CPUSet in ICI code instead of cpu_mask_t 2013-12-06 03:08:39 +01:00
Pawel Dziepak
5f3798921f x86/paging: Use ROUNUP() to compute the number of initial slots 2013-12-05 23:33:03 +01:00
Pawel Dziepak
730882d615 kernel: Remove RunQueueLink.h 2013-12-05 23:28:42 +01:00
Pawel Dziepak
52b442a687 kernel: smp_cpu_rendezvous(): Use counter instead of bitmap 2013-12-05 23:10:04 +01:00
Pawel Dziepak
d287274dce scheduler: Code refactoring 2013-12-05 22:47:30 +01:00
Ingo Weinhold
736fe5bc63 Fix build with TRANSLATION_MAP_TRACING enabled 2013-12-05 21:44:54 +01:00
Ingo Weinhold
372b309a4a X86VMTranslationMapPAE: Fix gcc 2 warning
... which due to the reactivated -Werror causes the build to fail.
2013-12-05 20:42:06 +01:00
Ingo Weinhold
7b83ce1142 Add KDL command "mapping"
* VMTranslationMap:
  - Add DebugPrintMappingInfo(): Given a virtual address it is supposed
    to print the paging structure information for that address. To be
    implemented by derived classes.
  - Add DebugGetReverseMappingInfo(): Given a physical addresss it is
    supposed to find all virtual addresses mapped to it. To be
    implemented by derived classes.
* X86VMTranslationMapPAE: Implement the new methods
  DebugPrintMappingInfo() and DebugGetReverseMappingInfo().
* Add KDL command "mapping". It supports both virtual address lookups
  and reverse lookups.
2013-12-05 05:13:21 +01:00
Pawel Dziepak
2e3cbcfa8a x86: Allocate as much initial physical page pools as needed 2013-12-02 03:19:25 +01:00
Ingo Weinhold
e551626f40 Implement support for a SYS:ENV attribute on executable
__flatten_process_args() does now have the executable path as an
additional (optional) parameter. If specified, the function will read
the file's SYS:ENV attribute (if set) and use its value to modified the
environment it is preparing for the new process. Currently supported
attribute values are strings consisting of "<var>=<value>" substrings
separated by "\0" (backslash zero), with '\' being used as an escape
character. The environment will be altered to contain the specified
"<var>=<value>" elements, replacing a preexisting <var> element (if
any).

A possible use case would be setting a SYS:ENV attribute with value
"DISABLE_ASLR=1" on an executable that needs ASLR disabled.
2013-12-01 18:34:07 +01:00
Ingo Weinhold
7bf85edf58 Allow disabling ASLR via DISABLE_ASLR environment variable
* VMAddressSpace: Add randomizingEnabled property.
* VMUserAddressSpace: Randomize addresses only when randomizingEnabled
  property is set.
* create_team_arg(): Check, if the team's environment contains
  "DISABLE_ASLR=1". Set the team's address space property
  randomizingEnabled accordingly in load_image_internal() and
  exec_team().
2013-12-01 02:51:50 +01:00
Ingo Weinhold
84ed99c2aa mmap(): Fix !MAP_FIXED with non-NULL address case
In that case the caller ideally wants to obtain an allocation at the
specified address, which was thwarted by using
B_RANDOMIZED_BASE_ADDRESS. Use B_BASE_ADDRESS instead.

This improves the experience with the gcc 4 pre-compiled headers
implementation (which expects to be able to map the PCH file at the same
address where it was located originally when it had been created), but
doesn't fix it completely. As long as ASLR is active, it is always
possible that something else (mapped shared objects, heap, stack) is in
the way.
2013-12-01 00:58:28 +01:00
Ingo Weinhold
97a4e3202f VMUserAddressSpace: Use align_address() instead of ROUNDUP()
Mainly for aesthetical reasons.
2013-12-01 00:46:41 +01:00
Ingo Weinhold
6c41755609 VMUserAddressSpace::_InsertAreaSlot(): Fix base address handling
Unless a free range was found before the first area a specified base
address was ignored. In the non-randomized case this could result in
a range other than (i.e. starting before) the preferred one being
chosen, although the preferred range was available.
2013-12-01 00:44:58 +01:00
Ingo Weinhold
7b96ce222a VMUserAddressSpace: Small coding style fixes 2013-11-30 23:17:34 +01:00
Ingo Weinhold
93e99b6113 VMUserAddressSpace: Use std::min/max instead of min/max_c 2013-11-30 23:13:48 +01:00
Ingo Weinhold
65947ae5ae boot loader: blacklist menu: Set different title when disabled
When booting from CD (or when no boot volume has been selected)
blacklisting isn't supported. In that case let the menu title indicated
that.
2013-11-30 19:58:41 +01:00
Ingo Weinhold
ccfc7bea50 boot loader: blacklist menu: Add "Return to ..." item 2013-11-30 19:56:13 +01:00
Ingo Weinhold
cbfc38c62d boot loader: MenuItem: Add SetLabel() 2013-11-30 19:39:57 +01:00
Ingo Weinhold
2a368f9b0e boot loader: text menu: run_menu(): Fix empty menu crash 2013-11-30 19:25:56 +01:00
Ingo Weinhold
aea2cb917e device_manager: Implement unpublish_device() 2013-11-30 17:02:49 +01:00
Ingo Weinhold
28092be196 devfs: Add devfs_{get,put}_device()
devfs_get_device() returns the device for a given path (if any), also
acquiring a reference to its vnode (thus ensuring the device won't go
away). devfs_put_device() puts the device vnode's reference.
2013-11-30 17:02:48 +01:00
Ingo Weinhold
e26c3df48c devfs: Remove superfluous create() hook
We don't support creation of files and the VFS calls open() when an
entry already exists.
2013-11-30 17:02:48 +01:00
Pawel Dziepak
255b601750 scheduler: Do not send reschedule ICI when not needed 2013-11-29 21:40:25 +01:00
Pawel Dziepak
2b7ea4cddf kernel: Remove Thread::next_state 2013-11-29 19:31:10 +01:00
Pawel Dziepak
c19f1e4fbb scheduler: Add missing check for real time threads 2013-11-29 18:09:56 +01:00
Pawel Dziepak
673f08a995 kernel: Make thread_block_locked() private 2013-11-29 05:30:50 +01:00
Pawel Dziepak
0721899709 scheduler: Allow mode to specify time slice length 2013-11-29 05:11:44 +01:00
Pawel Dziepak
7f8cf14b71 scheduler, kernel/util: Fix style issues 2013-11-29 04:51:38 +01:00
Pawel Dziepak
1987bf19b5 scheduler: Update CPU disabling code to match recent changes 2013-11-29 04:35:50 +01:00
Pawel Dziepak
1ee1d0cbab kernel, drivers: Fix gcc2 build 2013-11-29 03:47:38 +01:00
Pawel Dziepak
3514fd77f7 kernel: Reduce lock contention when processing ICIs 2013-11-29 03:36:44 +01:00
Pawel Dziepak
e736a456ba kernel: Forbid implicit casts between spinlock and int32 2013-11-29 03:36:31 +01:00
Pawel Dziepak
7b4befcd47 scheduler: Introduce upper bound on latency 2013-11-29 03:28:28 +01:00
Pawel Dziepak
f2243876df scheduler: Remove some unnecessary checks against idle threads 2013-11-28 17:53:19 +01:00
Pawel Dziepak
f9ee217ad6 scheduler: Migrate threads less often in power saving mode 2013-11-28 16:33:50 +01:00
Pawel Dziepak
286b341a40 kernel: Merge two occurences of thread resume code 2013-11-28 14:03:57 +01:00
Pawel Dziepak
87115715b4 scheduler: Protect package data with rw_spinlock 2013-11-27 04:57:26 +01:00
Pawel Dziepak
9caf7f4fb9 scheduler: Update estimate_max_scheduling_latency() 2013-11-27 04:15:36 +01:00
Pawel Dziepak
7d7dc357bf scheduler: Move simple inline functions to scheduler_common.h 2013-11-27 03:50:43 +01:00
Rene Gollent
09a8919213 InstallationLocations: Add missing static specifiers.
- Fixes a crash in find_paths() due to the InstallationLocations object getting overwritten.

Thanks to Chris Roberts for reporting.
2013-11-26 21:45:35 -05:00
Pawel Dziepak
28da7e985f scheduler: Improve debug commands 2013-11-27 03:36:06 +01:00
Pawel Dziepak
22ae68fa69 scheduler: Simplify thread priority penalties 2013-11-27 03:19:44 +01:00
Ingo Weinhold
8d23c440f7 runtime loader: Add support for $ORIGIN in rpath
Like in Linux it resolves to the directory of the shared object whose
needed library is to be loaded.
2013-11-26 16:40:42 +01:00
Pawel Dziepak
b41eaf299a scheduler_set_thread_priority: Fix null dereference 2013-11-26 03:40:32 +01:00
Pawel Dziepak
35153d1c49 scheduler: Send reschedule ICI after enqueueing the thread 2013-11-26 03:03:41 +01:00
Pawel Dziepak
7db89e8dc3 kernel: Rework cpuidle module
* Create new interface for cpuidle modules (similar to the cpufreq
   interface)
 * Generic cpuidle module is no longer needed
 * Fix and update Intel C-State module
2013-11-25 23:50:27 +01:00
Ingo Weinhold
f170a888c2 FIFO: Handle user reads/writes more correctly
* Determine whether called from userland or kernel.
* Check the buffer address via IS_USER_ADDRESS(), if from userland.
* Simplify things by merging UserRead() with Read() and
  UserWrite() with Write().
2013-11-25 16:08:00 +01:00
Ingo Weinhold
8019fdbab8 FIFO: Implement FION{BIO,READ}, B_SET_[NON]BLOCKING_IO ioctls 2013-11-25 16:08:00 +01:00
Ingo Weinhold
fd0bfd5593 FIFO: More correct locking when accessing file_cookie::open_mode 2013-11-25 16:08:00 +01:00
Ingo Weinhold
38b150a9de VFS FIFO: Add "fifo" KDL command
Prints information about a FIFO node and, optionally, its data buffer
content.
2013-11-25 12:45:37 +01:00
Ingo Weinhold
fb52b1f8b4 VFS FIFO: Enlarge FIFO buffer sizes
* Increase FIFO buffer capacity from 32 to 64 KiB and the FIFO atomic
  write size ({BUF_SIZE}) from 512 bytes to 4 KiB (both like Linux).
* Fix *pathconf(..., _PC_PIPE_BUF). It was returning 4 KiB although the
  implemented atomic write size was 512 bytes only. Now both *pathconf()
  and the FIFO implementation refer to the same constant.
2013-11-25 12:45:37 +01:00
Ingo Weinhold
334ae3c73b VFS FIFO: Fix RingBuffer::Read()/Write() return types
size_t -> ssize_t, since they may actually return an error code.
2013-11-25 12:45:37 +01:00
Ingo Weinhold
dd11460a49 Add a hex dump utility for use in KDL commands 2013-11-25 12:45:36 +01:00
Pawel Dziepak
0e94a12f8e kernel: Make CACHE_LINE_ALIGN visible in the whole kernel 2013-11-25 00:35:15 +01:00
Pawel Dziepak
26970784cd scheduler: Clean scheduler_common.h
scheduler_common.h is now meant for types, variables and functions used
by both core scheduler code and implementations of scheduler modes.
Functions like switch_thread() and update_thread_times() do not belong
there anymore.
2013-11-25 00:17:42 +01:00
Pawel Dziepak
1e8ed5558d cpufreq: Rank modules and choose the best one 2013-11-25 00:08:13 +01:00
Pawel Dziepak
13a89839fc scheduler: Fix power saving mode and other minor improvements 2013-11-24 23:51:30 +01:00
Pawel Dziepak
f95b6fdfc8 scheudler: Do not include irq load in thread load 2013-11-24 23:18:58 +01:00
Pawel Dziepak
cec16c2dcf spinlock: Fix panic messages
Thanks Jérôme for pointing this out.
2013-11-24 22:54:14 +01:00
Pawel Dziepak
03f7d3d1db kernel: Restore logical processor disabling 2013-11-24 22:51:07 +01:00
Ezo
7f6991c35e Fixed resource leak and possible strings corruption
Signed-off-by: Ingo Weinhold <ingo_weinhold@gmx.de>
2013-11-22 13:44:10 +01:00
Pawel Dziepak
7c7b9b795b scheduler: Return time stolen by irq and ipi handlers 2013-11-22 04:25:37 +01:00
Pawel Dziepak
1a7eb50254 scheduler: Calculate correct load on SMT processors 2013-11-22 03:20:19 +01:00
Pawel Dziepak
65741c8b56 scheduler: Improve locking 2013-11-22 03:00:08 +01:00
Pawel Dziepak
4ec76fd89d libroot: {g,s}et_scheduler_mode(): Avoid name clash
Thanks Ingo for pointing this out.
2013-11-21 21:51:46 +01:00
Ingo Weinhold
23c521cf5e find_path*(): Improve B_FIND_PATH_IMAGE_PATH handling
* get_file_attribute(): Use O_NOTRAVERSE, so we correctly read the
  attribute from symlinks.
* internal_path_for_path(): Shuffle things around a bit: The dependency
  is resolved before handling B_FIND_PATH_PACKAGE_PATH, now. This adds
  support for getting the package file for a dependency. The dependency
  was ignored in this case before.
* Use kSystemPackageLinksDirectory instead of hard-coding "/packages".
2013-11-21 13:29:20 +01:00
Pawel Dziepak
14e36af649 kernel[/util]: Fix debug builds 2013-11-21 03:24:54 +01:00
Pawel Dziepak
024541a4c8 kernel: Improve rw_spinlock implementation
* Add more debug checks
 * Reduce the number of executed instructions that lock the bus.
2013-11-21 02:25:03 +01:00
Pawel Dziepak
6fb61d001a scheduler: Preallocate temporary heaps for debug commands 2013-11-21 00:59:40 +01:00
Pawel Dziepak
308f594e2a kernel, libroot: Make scheduler modes interface public 2013-11-20 23:32:40 +01:00
Pawel Dziepak
cd1e7814a9 scheduler: Reduce scheduler mode lock cache bouncing 2013-11-20 21:49:31 +01:00
Pawel Dziepak
683b9bbf07 scheduler: Improve power saving mode, part 2
Consequences of committing & pushing too quickly...
2013-11-20 21:21:31 +01:00
Pawel Dziepak
ecfd444935 scheduler: Improve power saving mode
* Remove possibility to temporarily disable small task packing.
 * When small task packing target gets overloaded continue packing
   threads on another core, but avoid migrating the already packed
   ones.

Scheduler still tends to needlessly migrate threads to another cores
when under heavier load, but it is now much better than before.
2013-11-20 20:52:11 +01:00
Pawel Dziepak
3eb4224bf6 kernel: Make sure mutex::holder is set to a valid value 2013-11-20 17:53:39 +01:00
Pawel Dziepak
57d5d678f2 x86_64: Fix atomic functions 2013-11-20 17:02:51 +01:00
Ingo Weinhold
c04f3a625a boot loader: Add safe mode blacklist submenu
It's a browser for the system package content, where entries can be
selected to blacklist them. The selected entries are removed from the
packagefs instance in the boot loader, so that e.g. selected drivers
won't be picked up. The paths are also added to the safe mode driver
settings and will be interpreted when the system packagefs instance is
mounted by the kernel.
2013-11-20 16:00:35 +01:00
Ingo Weinhold
f2620e4714 boot loader: add_safe_mode_settings(): Make parameter const 2013-11-20 16:00:34 +01:00
Ingo Weinhold
6c7abe9829 boot loader: Menu[Item] API improvements
* Make Menu and MenuItem polymorphic.
* MenuItem:
  - Make SetMarked() virtual, so it can be overridden.
  - Add SetSubmenu() and Supermenu().
  - Delete the submenu in the destructor.
* Menu:
  - Add Entered()/Exited() hooks. They frame the time the user navigates
    the menu or any of its submenus. The hooks allow for subclasses
    populating their item list dynamically.
  - Add SortItems().
* Update boot loader menu copyright text to include 2013, now that it is
  over soon. :-)
2013-11-20 16:00:34 +01:00
Pawel Dziepak
c4ac37a35e scheduler: Try to pack IRQs in power saving mode 2013-11-20 12:52:05 +01:00
Pawel Dziepak
9c2e74da04 scheduler: Move mode specific logic to separate files 2013-11-20 09:46:59 +01:00
Jérôme Duval
72950e7c15 runtime_loader: fixes the 64-bit build.
1/ error: no matching function for call to 'min(long unsigned int,
uint32&)'.
2/ error: comparison between signed and unsigned integer expressions.
2013-11-19 20:17:08 +01:00
Ingo Weinhold
3a7e0b0014 packagefs: Support blacklisting entries in packages
In each installation location, it is now possible to create a settings
file "packages" that allows to blacklist entries contained in packages.
The format is:

Package <package name> {
	EntryBlacklist {
		<entry path>
		...
	}
}
...

<package name> is the base name (no version) of the respective package
(e.g. "haiku"), <entry path> is an installation location relative path
(e.g. "add-ons/Translators/FooTranslator").

Blacklisted entries will be ignored by packagefs, i.e. they won't appear
in the file system. This addresses the issue that it may be necessary to
remove a problematic file (e.g. driver, add-on, or library), which would
otherwise require editing the containing package file.

The settings file is not not "live". Changes take effect only after
reboot (respectively when remounting the concerned packagefs volume).
2013-11-19 15:30:34 +01:00
Ingo Weinhold
2fdd1d9ef1 khash: Move string hash functions to own header/source file
Unlike khash they shouldn't be phased out (only renamed).
2013-11-19 15:08:34 +01:00
Ingo Weinhold
efe9df3791 driver settings: Add load_driver_settings_file()
Allows loading an already opened driver settings file (by FD).
2013-11-19 15:06:30 +01:00
Ingo Weinhold
cf09345cf5 driver settings: Remove dead load_driver_settings_from_path()
load_driver_settings() supports being passed an absolute path.
2013-11-19 14:02:21 +01:00
Ingo Weinhold
81522ad41b find_path_for_path_etc(): Fail for B_FIND_PATH_IMAGE_PATH
There's no image in this case. We would just return the path we were
given.
2013-11-19 02:05:35 +01:00
Ingo Weinhold
22e92014f0 s/B_FIND_PATH_IMAGE_PACKAGE_PATH/B_FIND_PATH_PACKAGE_PATH/
It doesn't only work for image files, so make the name more general.
2013-11-19 02:05:35 +01:00
Pawel Dziepak
e2ff9a2865 scheduler: Rebalance IRQs on overloaded cores 2013-11-18 07:05:35 +01:00
Pawel Dziepak
f14e4567e8 kernel: Use CPU topology to distribute IRQs 2013-11-18 05:37:45 +01:00
Pawel Dziepak
d897a478d7 kernel: Allow reassigning IRQs to logical processors 2013-11-18 04:55:25 +01:00
Ingo Weinhold
94fb954c53 find_path*(): Support user specific home directory
No longer hard-code the home directory path. Instead ask
find_directory(), so we get the correct one for the current user.
2013-11-18 01:50:49 +01:00
Pawel Dziepak
955c7edec2 kernel: Measure time spent in interrupt handlers 2013-11-18 01:50:37 +01:00
Pawel Dziepak
6a164daad4 kernel: Track load produced by interrupt handlers 2013-11-18 01:17:44 +01:00
Ingo Weinhold
04c6cb37bb find_directory(): Add architecture support
* Move PathBuffer helper class out of find_paths.cpp into its own
  header.
* find_directory():
  - Make use of MemoryDeleter to simplify things.
  - Make use of PathBuffer for a simpler and more correct handling.
  - Make B_UTILITIES_DIRECTORY to B_APPS_DIRECTORY. /boot/utilities
    doesn't exist anyway.
  - Resolve the concerned constants to the architecture specific
    subdirectory, when called in a secondary architecture context, just
    like find_path*().
2013-11-17 19:11:03 +01:00
Ingo Weinhold
7fb0d6c269 find_path*(): Fix B_FIND_PATH_MEDIA_NODES_DIRECTORY
It is architecture specific as well.
2013-11-17 19:11:02 +01:00
Ingo Weinhold
8a3fe6d1bf Add private __getenv_reentrant()
A reentrant variant of getenv().
2013-11-17 19:11:02 +01:00
Ingo Weinhold
c39c9283aa Add get_architectures() and C++ versions
* get_architectures() returns the primary and the secondary
  architectures in one array. That turned out to be convenient.
* Add C++ versions for get[_secondary]_architectures(), returning a
  BStringList.
2013-11-17 02:09:37 +01:00
Ingo Weinhold
60b39cd741 Add get_*architecture() API, extend find_path*() API
* Add get_architecture(), get_primary_architecture(),
  get_secondary_architectures(), guess_architecture_for_path() to get
  the caller's architecture, the primary architecture, all secondary
  architectures, or the architecture associated with a specified path
  respectively.
* Rename the find_path*() functions to find_path*_etc() and add an
  optional architecture parameter. Add simplified find_path*()
  functions.
* BPathFinder: Add FindPath[s]() versions with an architecture
  parameter.
2013-11-17 02:09:36 +01:00
Ingo Weinhold
cf7e2ad812 runtime loader: Export get_executable_architecture() function
Given a path of an ELF file, it tries to determine its architecture.
2013-11-17 02:09:36 +01:00
Axel Dörfler
04da290fd6 Minor cleanup. 2013-11-15 23:13:54 +01:00
Pawel Dziepak
288a2664a2 scheduler: Remove sSchedulerInternalLock
* pin idle threads to their specific CPUs
 * allow scheduler to implement SMP_MSG_RESCHEDULE handler
 * scheduler_set_thread_priority() reworked
 * at reschedule: enqueue old thread after dequeueing the new one
2013-11-13 05:31:58 +01:00
Ingo Weinhold
2b269f2e47 unlock_memory_etc(): Fix address space reference leak
unlock_memory_etc() is supposed to release the address space reference
lock_memory_etc() acquired. It didn't do that, though.
2013-11-13 01:47:36 +01:00
Ingo Weinhold
93fb0ff056 vm: lock_memory_etc(): Fix error case
In case something went wrong, call unlock_memory_etc() with the rounded
base address instead of with the original address. If the original
address wasn't page aligned, unlock_memory_etc() would otherwise try to
unlock an additional page.
2013-11-13 01:47:35 +01:00
Pawel Dziepak
72e1b394a4 scheduler: Fix gcc2 build 2013-11-13 00:36:48 +01:00
Pawel Dziepak
5f3a65e578 scheduler: Remove sCorePriorityHeap
sCorePriorityHeap was meant to be a temporary solution anyway. Thread
migration and assignment is now entirely based on core load.
2013-11-13 00:01:02 +01:00
Pawel Dziepak
829f836324 scheduler: Minor cleanup 2013-11-12 04:42:12 +01:00
Pawel Dziepak
8818c942dd scheduler: Add {CPU,Core,Package}Entry constructors 2013-11-12 04:26:32 +01:00
Pawel Dziepak
e1c40769d3 scheduler: Atomically access time and load measurements 2013-11-12 04:23:42 +01:00
Ingo Weinhold
104c0688da dir_vnode_to_path(): Fix uninitialized status variable 2013-11-11 23:04:09 +01:00
Ingo Weinhold
24d0e21f51 do_iterative_fd_io_iterate(): Support sparse files
* Check whether the vectors we get are sparse file vectors and satisfy
  them immediately instead of creating a subrequest. Untested, since the
  API isn't used by ext2 as it should be.
* Add error == B_OK to the condition of the outer loop.
2013-11-11 22:27:53 +01:00
Ingo Weinhold
9f7e78ee79 IORequest::Init(): Assert offset >= 0
Just to make sure we catch sparse file vectors that shouldn't be passed
here.
2013-11-11 22:27:53 +01:00
Ingo Weinhold
c63b3de665 IORequest: Add ClearData() 2013-11-11 22:27:53 +01:00
Ingo Weinhold
426fe7db1d IORequest::_CopyData(): Small optimization
If we're running in the context of the user team the I/O buffer belongs
to, we can use _CopySimple() as well.
2013-11-11 22:27:53 +01:00
Ingo Weinhold
07f6506eb6 VFS: Fix broken zero_pages()
Besides that it failed to actually iterate through the vectors, it
shouldn't try to clear physical memory in the first place. The iovecs
refer to virtual address ranges. Rename it to zero_iovecs() to avoid
confusion.
2013-11-11 22:27:52 +01:00
Ingo Weinhold
e5f6591382 VM: vm_memset_physical(): Correct length parameter type 2013-11-11 22:27:52 +01:00
Pawel Dziepak
d17b71d6b0 scheduler: Reduce false sharing of per-CPU and per-core data 2013-11-11 21:46:18 +01:00
Pawel Dziepak
a1feba678d kernel/undertaker: Make sure the thread isn't running anymore 2013-11-11 21:04:38 +01:00
Jérôme Duval
e94bffa072 vm: allocate wrappers on the heap with small stack array fallback
see comments on #10169. Thanks Ingo for reviewing!
2013-11-11 18:34:14 +01:00
Olivier Coursière
be6d2f97cd libroot: Accept NULL for the resolved_name argument of realpath()
as specified in IEEE Std 1003.1, 2013 Edition, see
http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html

In this case, the returned buffer is allocated with realpath() and can be
deallocated by the caller with free().
The behavior was only "implementation defined" in previous revisions like
IEEE Std 1003.1, 2004 Edition, see
http://pubs.opengroup.org/onlinepubs/000095399/functions/realpath.html

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2013-11-10 23:26:18 +01:00
Ingo Weinhold
18640f25d9 vfs: dir_vnode_to_path(): Fix bug with chroot on mount
Simplify the code, which also fixes the bug that the I/O context's root
was ignored when it was a mount point, thus resulting in globally rooted
paths in this case.
2013-11-10 15:43:43 +01:00
Jérôme Duval
7f0b39a791 CID 991479 Out-of-bounds access 2013-11-09 13:40:07 +01:00
Pawel Dziepak
7e1c4534df libroot: Add adaptive mutex implementation 2013-11-08 03:37:30 +01:00
Pawel Dziepak
03fb2d8868 kernel: Remove gSchedulerLock
* Thread::scheduler_lock protects thread state, priority, etc.
 * sThreadCreationLock protects thread creation and removal and list of
   threads in team.
 * Team::signal_lock and Team::time_lock protect list of threads in team
   as well.
 * Scheduler uses its own internal locking.
2013-11-08 02:41:26 +01:00
Pawel Dziepak
72addc62e0 kernel: Introduce Thread::time_lock and Team::time_lock 2013-11-07 22:16:36 +01:00
Pawel Dziepak
3519eb334a kernel: Change Thread::team_lock to rw_spinlock 2013-11-07 04:20:59 +01:00
Pawel Dziepak
defee266db kernel: Add read write spinlock implementation 2013-11-07 04:20:32 +01:00
Pawel Dziepak
20ded5c2eb kernel/posix: Do not use thread_block_locked() 2013-11-07 02:06:42 +01:00
Pawel Dziepak
d3e5752b11 scheduler: Performance mode is actually low latency mode 2013-11-07 01:50:20 +01:00
Pawel Dziepak
83983eaf38 kernel: Remove Thread::alarm 2013-11-07 01:40:02 +01:00
Pawel Dziepak
aa4aca0264 kernel: Protect signal data with Team::signal_lock 2013-11-07 01:32:48 +01:00
Pawel Dziepak
73ad2473e7 Remove remaining unnecessary 'volatile' qualifiers 2013-11-06 00:03:07 +01:00
Pawel Dziepak
273f2f38cd kernel: Improve spinlock implementation
atomic_or() and atomic_and() are not supported by x86 are need to be
emulated using CAS. Use atomic_get_and_set() and atomic_set() instead.
2013-11-05 22:47:18 +01:00
Pawel Dziepak
077c84eb27 kernel: atomic_*() functions rework
* No need for the atomically changed variables to be declared as
   volatile.
 * Drop support for atomically getting and setting unaligned data.
 * Introduce atomic_get_and_set[64]() which works the same as
   atomic_set[64]() used to. atomic_set[64]() does not return the
   previous value anymore.
2013-11-05 22:32:59 +01:00