History log of /haiku/src/system/kernel/lib/Jamfile
Revision Date Author Comments
# 46a6070b 31-Aug-2023 Augustin Cavalier <waddlesplash@gmail.com>

libroot: Replace strcspn and strchrnul with musl versions.

Removes the last BSD advertising clause from the "string" directory.


# ddde98b0 24-Jul-2023 Augustin Cavalier <waddlesplash@gmail.com>

kernel: Move some source files around.

* stack_protector.cpp now lives with other files in "lib".

* Notifications.cpp, wait_for_objects.cpp go to a new "events" directory,
which will soon contain more files related to the event_queue.

No functional change.


# 87be02e1 08-Apr-2023 Augustin Cavalier <waddlesplash@gmail.com>

libroot: Replace rand() and rand_r() implementations with musl versions.

These functions are obsolete, anyway. We should probably remove
them from the kernel at some point...


# 1e860e07 31-Jan-2023 Augustin Cavalier <waddlesplash@gmail.com>

BPrivate::WeakReferenceable: Move implementation to a .cpp.

No functional change to the implementation, just getting it
out of a header.


# d9e730c8 24-Jul-2022 PulkoMandy <pulkomandy@pulkomandy.tk>

libroot: generate a name for nameless volumes

Generate a name indicating the volume size and filesystem.

Remove code that was doing that or similar things in various
filesystems.

Change-Id: I6b993735e58cdfaf1f19af575e918614c7fe5679
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5381
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>


# e3197646 27-Sep-2022 Augustin Cavalier <waddlesplash@gmail.com>

kernel/lib: Fix reference to dirent.c after prior change.


# d338200e 30-May-2022 Trung Nguyen <trungnt282910@gmail.com>

libs/posix: Implemented new locale functions

Implemented the missing POSIX functions in <locale.h>:
newlocale, duplocale, uselocale, and freelocale, and also
provided missing type definitions for <locale.h>.

Implemented missing POSIX locale-based function variants.

Modified LocaleBackend so that it could support thread-local
locales.

Some glibc-like locale-related variables supporting
ctype and printf family of functions have also been updated
to reflect the thread-local variables present in the latest
glibc sources.

As there have been some modifications to global symbols
in libroot, libroot_stubs.c has been regenerated.

Bug: #17168
Change-Id: Ibf296c58c47d42d1d1dfb2ce64042442f2679431
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5351
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 0d560e87 27-Jun-2022 David Karoly <karolyd577@gmail.com>

kernel/lib: add missing musl include

This is needed to fix the build on arm as atomic_arch.h
relies on musl libc.h and features.h

Change-Id: I5bfa32b7b0fa1662cc9ee8cd8fa3037d8a5e2431
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5418
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 0d29def7 09-Jun-2022 Augustin Cavalier <waddlesplash@gmail.com>

kernel/lib: Adjustments to use musl's ffs implementation.

This actually has another advantage: if we can use musl sources
in the kernel POSIX support, then we can drop some of the BSD
sources that are used only in the kernel and have a different
implementation in userland (e.g. strtod) and have just one
version for both.


# eb22dbd0 20-Apr-2022 Jérôme Duval <jerome.duval@gmail.com>

libroot: check timeout interval parameter in ppoll(), pselect() and select()

* also introduce timeval_to_bigtime
* time_private is c++ only

Change-Id: I2bddbe5f95240735c7b42ccf429dcbb3f1e8bb1b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5220
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 56d38808 19-Oct-2021 Adrien Destugues <pulkomandy@pulkomandy.tk>

kernel: add memmem to available functions

It will be needed in the VESA driver to locate things in the VESA BIOS.

Change-Id: Iab42886beb99414fec4d1ad99a08299be679b4d6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4623
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 6ac3a280 23-Nov-2017 Jérôme Duval <jerome.duval@gmail.com>

Add ZstdCompressionAlgorithm.

* kernel lib is decompress only (like zlib).
* expand compression_test for zstd.


# 9ec8a1e4 29-Dec-2015 Adrien Destugues <pulkomandy@pulkomandy.tk>

Kernel POSIX: add stpcpy.

- Required by new GCC versions, which are able to optimize string
appends using it.
- Fixes build of ACPICA for x86/gcc4.


# f9a8f3e7 05-Jul-2015 Michael Lotz <mmlr@mlotz.ch>

Clean up various whitespace and fix one header guard.


# 32832cbe 23-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove BPackageKit::BDataOutput

Use BDataIO instead.


# 5e36a367 23-May-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Convert strdup.c to C++.


# 04c6cb37 17-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

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*().


# e5b4a167 25-Apr-2012 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Since we are patching strncpy.c change it over to strncpy.cpp.


# 55cf6996 29-Dec-2011 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Rename strlen.c strnlen.c to strlen.cpp strnlen.cpp.

No changes in the files themselves in this commit.


# 24df6592 11-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged signals-merge branch into trunk with the following changes:
* Reorganized the kernel locking related to threads and teams.
* We now discriminate correctly between process and thread signals. Signal
handlers have been moved to teams. Fixes #5679.
* Implemented real-time signal support, including signal queuing, SA_SIGINFO
support, sigqueue(), sigwaitinfo(), sigtimedwait(), waitid(), and the addition
of the real-time signal range. Closes #1935 and #2695.
* Gave SIGBUS a separate signal number. Fixes #6704.
* Implemented <time.h> clock and timer support, and fixed/completed alarm() and
[set]itimer(). Closes #5682.
* Implemented support for thread cancellation. Closes #5686.
* Moved send_signal() from <signal.h> to <OS.h>. Fixes #7554.
* Lots over smaller more or less related changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42116 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 22a7fe96 15-May-2011 Oliver Tappe <zooey@hirschkaefer.de>

Cleanup system-revision stuff.
* move system_revision.h to headers/private/libroot
* unify libroot's get_system_revision() (the one I introduced recently) with kernel's
get_haiku_revision(), the function is now called get_haiku_revision() in the kernel
and __get_haiku_revision() in libroot
* system_revision.c is now being built as part of libroot and as part of the kernel
* adjusted all callers of get_system_revision() accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41516 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a3f66598 23-Jul-2010 Oliver Tappe <zooey@hirschkaefer.de>

* reintegrated posix-locale

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37725 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 85db3873 25-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

find_directory.c, driver_settings.c: Converted to C++.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37256 a95241bf-73f2-0310-859d-f6bbb57e9c96


# aeae7bf4 13-Apr-2010 Michael Lotz <mmlr@mlotz.ch>

Add ffs() (find first set bit, starting at least significant) to the kernel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36220 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ac20a24e 01-Jan-2010 Colin Günther <coling@gmx.de>

Adding strndup.cpp to kernel_lib_posix. Introduced for having a safe way
duplicating firmware names in firmware_get() of the freebsd compat layer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34844 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bd185b41 01-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

*.c -> *.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34417 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fdec1a3f 10-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Should have been part of r33976: fcntl.c and open.c have been joined to
fcntl.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33977 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bcfe344c 22-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Made our struct stat POSIX compliant again -- the time_t fields have been
replaced by timespec fields. Via macros the structure is still source
compatible with the old one.
* Introduced header <compat/sys/stat.h> that defines the old stat structure
(as stat_beos) and conversion functions
* Introduced versions for [l,f]stat().
* Added symbol versions for BDirectory::GetStatFor() for sake of binary
compatibility.
* BStatable::GetStat(): Renamed the old method, changed its parameter to
stat_beos*, and and made it private. Added a new version (using up a
reserved vtable slot). It remains source and binary compatible.
* BRefFilter::Filter(): Changed the struct stat* parameter to struct stat_beos*
for sake of binary compatibility. This breaks source compatibility, though,
which we can't help, since the class doesn't have reserved vtable slots.
* Fixed several issues with the stat structure change, mostly adjusted uses of
BRefFilter.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30830 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 28a650e9 07-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Made the WeakReferenceable class templatized. Not really sure yet I like that
better, though :-)
* Also fixed a mixup of the unintuitive argument order of our
atomic_test_and_set(); I guess I will change that sooner or later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29994 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e1fed132 06-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Added a WeakReferenceable implementation, completely untested yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29990 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b18c9b97 10-Oct-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Implemented x86 assembly version of memset().
* memset() is now available through the commpage.
* CPU modules can provide a model-optimized memset().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27952 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 379ad6d0 09-Oct-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved the arch specific stuff in src/system/kernel/lib into arch/...
subdirectories. Also moved the x86 kernel arch_string.S there.
* Moved memcpy.c from src/system/libroot/posix/string into the
arch/generic subdirectory.
* Dealt with the consequences of moving things around. Affected are also
the boot loader and runtime loader builds.

Adjust the m68k and ppc parts, too, but only the x86 build is tested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27947 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 765ae3a7 02-Jul-2008 Jérôme Duval <korli@users.berlios.de>

Applied patch from Mika Lindqvist: This patch implements both strlwr() and strupr() functions in libroot and includes strupr() in kernel build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26226 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 15ebab76 22-May-2008 François Revol <revol@free.fr>

*pathconf() need to call statvfs() to be more correct, but the kernel doesn't have it. Remove conf.c for now, it's likely not needed anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25624 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eb1a8c44 10-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

siglongjmp() calls __longjmp_return() also on x86, now. This resets the
signal mask as required. and also makes my recent return value fix
unnecessary, since __longjmp_return() already does that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25430 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8bba1c26 10-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Forgot to check this one in. setjmp.S is no more.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25429 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 98e67131 06-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved realtime_sem.{cpp,h} into new posix subdirectory.
* Renamed the old kernel_posix[_arch...].o to kernel_lib_posix...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25336 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4eb35609 11-Mar-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added real, effective and saved set- user and group IDs to the team
structure. They are properly inherited and updated on
fork(), load_image(), and exec().
* Implemented the get[e]{u,g}id(), set[[r]e]{u,g}id() family for real.
* getgroups() also calls the kernel now, but only returns the effective
group ID. Supplementary groups support is still missing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24359 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 34b3b26b 10-Jan-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged branch haiku/branches/developer/bonefish/optimization revision
23139 into trunk, with roughly the following changes (for details svn
log the branch):
* The int 99 syscall handler is now fully in assembly.
* Added a sysenter/sysexit handler and use it on Pentiums that support
it (via commpage).
* Got rid of i386_handle_trap(). A bit of functionality was moved into
the assembly handler which now uses a jump table to call C functions
handling the respective interrupt.
* Some optimizations to get user debugger support code out of the
interrupt handling path.
* Introduced a thread::flags fields which allows to skip handling of
rare events (signals, user debug enabling/disabling) on the
common interrupt handling path.
* Got rid of the explicit iframe stack. The iframes can still be
retrieved by iterating through the stack frames.
* Made the commpage an architecture independent feature. It's used for
the real time data stuff (instead of creating a separate area).
* The x86 CPU modules can now provide processor optimized versions for
common functions (currently memcpy() only). They are used in the
kernel and are provided to the userland via commpage entries.
* Introduced build system feature allowing easy use of C structure
member offsets in assembly code.

Changes after merging:
* Fixed merge conflict in src/system/kernel/arch/x86/arch_debug.cpp
(caused by refactoring and introduction of "call" debugger command).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23370 a95241bf-73f2-0310-859d-f6bbb57e9c96


# de373180 08-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

Removed gethostname() and sethostname() from the kernel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22493 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b2d056ec 02-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Add wait_for_objects.cpp to the kernel, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22418 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bec0386d 31-Jul-2007 Axel Dörfler <axeld@pinc-software.de>

bonefish+axeld: Implemented a robust notification framework for the kernel.
Will be used for node monitoring and other stuff, too (like the Registrar or the
VM low memory handler).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21768 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6430c896 21-May-2007 Axel Dörfler <axeld@pinc-software.de>

* Added find_directory() to the kernel - it currently may not work as good as the
userland version, tbough.
* Small style cleanup in find_directory.c.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21194 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 831486a2 16-Apr-2007 Travis Geiselbrecht <geist@foobox.com>

Turn the assembly optimized memcpy (simple rep movsd) back on for x86. Had to hack around the make system a bit, and the result is pretty nasty, specifically due to the amount of places in the system where various targets poke their fingers into the libroot directory.
The solution is less than optimal, but should work for now.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20722 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9bf1f552 01-Apr-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Enabled setjmp()/longjmp() support in the kernel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20499 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1822f5ec 07-Mar-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added strtod() and localeconv() to the kernel.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20348 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a83c8bbf 02-Feb-2007 Axel Dörfler <axeld@pinc-software.de>

Moved libroot/posix/kerrno.c to kernel/lib/ where it belongs, and renamed it to kernel_errno.c.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20044 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e55e1a0e 03-Jan-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented the PPC specific RTC support. We search for an "rtc"
device in the Open Firmware implementation of boot loader and
pass its path to the kernel, where it's opened and used for
getting/setting the real time. The expensive atomic_*64() on PPC
32-bit make things a bit more complicated. Moreover, missing
64 bit multiplication and division instructions won't really
allow system_time() to be anywhere near as fast as on x86. :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15837 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 957a1b17 30-Dec-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced new build system variables
{HAIKU,HOST,TARGET}_KERNEL_PIC_{CC,LINK}FLAGS which define the
compiler/linker flags specifying the kind of position independence
the kernel shall have. For x86 we had and still have -fno-pic, but the
PPC kernel has -fPIE (position independent executable) now, as we
need to relocate it.
* The boot loader relocates the kernel now. Mostly copied the relocation
code from the kernel ELF loader. Almost completely rewrote the PPC
specific relocation code, though. It's more correct and more complete now
(some things are still missing though).
* Added boot platform awareness to the kernel. Moved the generic
Open Firmware code (openfirmware.c/h) from the boot loader to the kernel.
* The kernel PPC serial debug output is sent to the console for the time
being.
* The PPC boot loader counts the CPUs now and allocates the kernel stacks
(made OF device iteration a bit more flexible on the way -- the search
can be restricted to subtree). Furthermore we really enter the kernel...
(Yay! :-) ... and crash in the first dprintf() (in the atomic_set()
called by acquire_spinlock()). kprintf() works, though.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15756 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 353d20c0 27-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* libroot and the runtime loader are no longer built with kernel rules.
* New rule Ld, analogously to KernelLd.
* Added StaticLibrary parameter for supplying additional objects.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15191 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 38f62644 26-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Reorganized building of kernel, boot loader, and libroot.
Each component is built in the respective subdirectory now
and no longer in src/system/Jamfile.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15184 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f9a8f3e72773095d5d7b2f2e1ff3eb3e58122f14 05-Jul-2015 Michael Lotz <mmlr@mlotz.ch>

Clean up various whitespace and fix one header guard.


# 32832cbe47f991cc6d2b29824903181d8baaaa63 23-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove BPackageKit::BDataOutput

Use BDataIO instead.


# 5e36a367d7edc677c0183c7a6fc6b6ec5bb40cf1 23-May-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Convert strdup.c to C++.


# 04c6cb37bb8e0115f90974e99d6d823857c6836e 17-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

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*().


# e5b4a1671d907d14bf0b61efc30a93de7c96709d 25-Apr-2012 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Since we are patching strncpy.c change it over to strncpy.cpp.


# 55cf69968f4d5be68301b548687d9b81cbee383a 29-Dec-2011 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Rename strlen.c strnlen.c to strlen.cpp strnlen.cpp.

No changes in the files themselves in this commit.


# 24df65921befcd0ad0c5c7866118f922da61cb96 11-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged signals-merge branch into trunk with the following changes:
* Reorganized the kernel locking related to threads and teams.
* We now discriminate correctly between process and thread signals. Signal
handlers have been moved to teams. Fixes #5679.
* Implemented real-time signal support, including signal queuing, SA_SIGINFO
support, sigqueue(), sigwaitinfo(), sigtimedwait(), waitid(), and the addition
of the real-time signal range. Closes #1935 and #2695.
* Gave SIGBUS a separate signal number. Fixes #6704.
* Implemented <time.h> clock and timer support, and fixed/completed alarm() and
[set]itimer(). Closes #5682.
* Implemented support for thread cancellation. Closes #5686.
* Moved send_signal() from <signal.h> to <OS.h>. Fixes #7554.
* Lots over smaller more or less related changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42116 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 22a7fe9695a6685994f516857f10a3e0efaf15c7 15-May-2011 Oliver Tappe <zooey@hirschkaefer.de>

Cleanup system-revision stuff.
* move system_revision.h to headers/private/libroot
* unify libroot's get_system_revision() (the one I introduced recently) with kernel's
get_haiku_revision(), the function is now called get_haiku_revision() in the kernel
and __get_haiku_revision() in libroot
* system_revision.c is now being built as part of libroot and as part of the kernel
* adjusted all callers of get_system_revision() accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41516 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a3f665982e2e078ba42e7bf941bd5f3dd8989c55 23-Jul-2010 Oliver Tappe <zooey@hirschkaefer.de>

* reintegrated posix-locale

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37725 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 85db3873a90753e45b82e249fb1030768610c390 25-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

find_directory.c, driver_settings.c: Converted to C++.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37256 a95241bf-73f2-0310-859d-f6bbb57e9c96


# aeae7bf4dc3c15df4e6ca0b46112f3702f0d5843 13-Apr-2010 Michael Lotz <mmlr@mlotz.ch>

Add ffs() (find first set bit, starting at least significant) to the kernel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36220 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ac20a24e6f5e1e496d551f97d2e026e0d852ba05 01-Jan-2010 Colin Günther <coling@gmx.de>

Adding strndup.cpp to kernel_lib_posix. Introduced for having a safe way
duplicating firmware names in firmware_get() of the freebsd compat layer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34844 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bd185b4117e06c1674c4d214abc3917acedc560d 01-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

*.c -> *.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34417 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fdec1a3f875a9e1d9a92583c00ed7c85cc252739 10-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Should have been part of r33976: fcntl.c and open.c have been joined to
fcntl.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33977 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bcfe344c537cb0dcee183c5a9afb4c362f5abe86 22-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Made our struct stat POSIX compliant again -- the time_t fields have been
replaced by timespec fields. Via macros the structure is still source
compatible with the old one.
* Introduced header <compat/sys/stat.h> that defines the old stat structure
(as stat_beos) and conversion functions
* Introduced versions for [l,f]stat().
* Added symbol versions for BDirectory::GetStatFor() for sake of binary
compatibility.
* BStatable::GetStat(): Renamed the old method, changed its parameter to
stat_beos*, and and made it private. Added a new version (using up a
reserved vtable slot). It remains source and binary compatible.
* BRefFilter::Filter(): Changed the struct stat* parameter to struct stat_beos*
for sake of binary compatibility. This breaks source compatibility, though,
which we can't help, since the class doesn't have reserved vtable slots.
* Fixed several issues with the stat structure change, mostly adjusted uses of
BRefFilter.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30830 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 28a650e94d4a50a8fd84416cb4d37971cd81b6c2 07-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Made the WeakReferenceable class templatized. Not really sure yet I like that
better, though :-)
* Also fixed a mixup of the unintuitive argument order of our
atomic_test_and_set(); I guess I will change that sooner or later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29994 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e1fed132d22ae23350588ad03bd63c2e4f68f061 06-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Added a WeakReferenceable implementation, completely untested yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29990 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b18c9b97aeb4a7af1c5bca0bc99f02ad19e716f4 10-Oct-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Implemented x86 assembly version of memset().
* memset() is now available through the commpage.
* CPU modules can provide a model-optimized memset().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27952 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 379ad6d0372d6b3242b4a56925f5b8512d63500f 09-Oct-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved the arch specific stuff in src/system/kernel/lib into arch/...
subdirectories. Also moved the x86 kernel arch_string.S there.
* Moved memcpy.c from src/system/libroot/posix/string into the
arch/generic subdirectory.
* Dealt with the consequences of moving things around. Affected are also
the boot loader and runtime loader builds.

Adjust the m68k and ppc parts, too, but only the x86 build is tested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27947 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 765ae3a785157ae7d8aa018280139122a7ec5443 02-Jul-2008 Jérôme Duval <korli@users.berlios.de>

Applied patch from Mika Lindqvist: This patch implements both strlwr() and strupr() functions in libroot and includes strupr() in kernel build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26226 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 15ebab7616e1ab4f919f481d986baa19e3f99006 22-May-2008 François Revol <revol@free.fr>

*pathconf() need to call statvfs() to be more correct, but the kernel doesn't have it. Remove conf.c for now, it's likely not needed anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25624 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eb1a8c446ef18a96d078835ab5bb842d83bcf924 10-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

siglongjmp() calls __longjmp_return() also on x86, now. This resets the
signal mask as required. and also makes my recent return value fix
unnecessary, since __longjmp_return() already does that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25430 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8bba1c2637bba863a8a8653d13ecd575fc23138b 10-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Forgot to check this one in. setjmp.S is no more.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25429 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 98e67131727de15752bc87a530612040c6955d17 06-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved realtime_sem.{cpp,h} into new posix subdirectory.
* Renamed the old kernel_posix[_arch...].o to kernel_lib_posix...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25336 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4eb3560949b15e7492c8055eb512e5dd68b2da32 11-Mar-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added real, effective and saved set- user and group IDs to the team
structure. They are properly inherited and updated on
fork(), load_image(), and exec().
* Implemented the get[e]{u,g}id(), set[[r]e]{u,g}id() family for real.
* getgroups() also calls the kernel now, but only returns the effective
group ID. Supplementary groups support is still missing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24359 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 34b3b26b3b8c46ba46ddde037b10dd173f4936d6 10-Jan-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged branch haiku/branches/developer/bonefish/optimization revision
23139 into trunk, with roughly the following changes (for details svn
log the branch):
* The int 99 syscall handler is now fully in assembly.
* Added a sysenter/sysexit handler and use it on Pentiums that support
it (via commpage).
* Got rid of i386_handle_trap(). A bit of functionality was moved into
the assembly handler which now uses a jump table to call C functions
handling the respective interrupt.
* Some optimizations to get user debugger support code out of the
interrupt handling path.
* Introduced a thread::flags fields which allows to skip handling of
rare events (signals, user debug enabling/disabling) on the
common interrupt handling path.
* Got rid of the explicit iframe stack. The iframes can still be
retrieved by iterating through the stack frames.
* Made the commpage an architecture independent feature. It's used for
the real time data stuff (instead of creating a separate area).
* The x86 CPU modules can now provide processor optimized versions for
common functions (currently memcpy() only). They are used in the
kernel and are provided to the userland via commpage entries.
* Introduced build system feature allowing easy use of C structure
member offsets in assembly code.

Changes after merging:
* Fixed merge conflict in src/system/kernel/arch/x86/arch_debug.cpp
(caused by refactoring and introduction of "call" debugger command).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23370 a95241bf-73f2-0310-859d-f6bbb57e9c96


# de373180609c8b42658103c0dafd38f96bc14eb4 08-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

Removed gethostname() and sethostname() from the kernel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22493 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b2d056ecdea6439d2340c28910d38c61ce6e5c67 02-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Add wait_for_objects.cpp to the kernel, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22418 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bec0386d8215cd1c8538d004322f275e05ad3bd3 31-Jul-2007 Axel Dörfler <axeld@pinc-software.de>

bonefish+axeld: Implemented a robust notification framework for the kernel.
Will be used for node monitoring and other stuff, too (like the Registrar or the
VM low memory handler).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21768 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6430c8961838782c3a10f2d16ed4b20be2aa1872 21-May-2007 Axel Dörfler <axeld@pinc-software.de>

* Added find_directory() to the kernel - it currently may not work as good as the
userland version, tbough.
* Small style cleanup in find_directory.c.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21194 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 831486a2d3ba8eb2a012bc59083f383811fff5a3 16-Apr-2007 Travis Geiselbrecht <geist@foobox.com>

Turn the assembly optimized memcpy (simple rep movsd) back on for x86. Had to hack around the make system a bit, and the result is pretty nasty, specifically due to the amount of places in the system where various targets poke their fingers into the libroot directory.
The solution is less than optimal, but should work for now.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20722 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9bf1f552d98d2f0550f2db30597e70865b7fc529 01-Apr-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Enabled setjmp()/longjmp() support in the kernel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20499 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1822f5ecbc265377e3cae37fbb0e9aab23ad9769 07-Mar-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added strtod() and localeconv() to the kernel.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20348 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a83c8bbffaac52830987276a7353bb0041d3b901 02-Feb-2007 Axel Dörfler <axeld@pinc-software.de>

Moved libroot/posix/kerrno.c to kernel/lib/ where it belongs, and renamed it to kernel_errno.c.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20044 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e55e1a0e666da61eb901533dae4af2ec44d216d8 03-Jan-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented the PPC specific RTC support. We search for an "rtc"
device in the Open Firmware implementation of boot loader and
pass its path to the kernel, where it's opened and used for
getting/setting the real time. The expensive atomic_*64() on PPC
32-bit make things a bit more complicated. Moreover, missing
64 bit multiplication and division instructions won't really
allow system_time() to be anywhere near as fast as on x86. :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15837 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 957a1b17eb9d13d6dbf164145e82997e16742549 30-Dec-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced new build system variables
{HAIKU,HOST,TARGET}_KERNEL_PIC_{CC,LINK}FLAGS which define the
compiler/linker flags specifying the kind of position independence
the kernel shall have. For x86 we had and still have -fno-pic, but the
PPC kernel has -fPIE (position independent executable) now, as we
need to relocate it.
* The boot loader relocates the kernel now. Mostly copied the relocation
code from the kernel ELF loader. Almost completely rewrote the PPC
specific relocation code, though. It's more correct and more complete now
(some things are still missing though).
* Added boot platform awareness to the kernel. Moved the generic
Open Firmware code (openfirmware.c/h) from the boot loader to the kernel.
* The kernel PPC serial debug output is sent to the console for the time
being.
* The PPC boot loader counts the CPUs now and allocates the kernel stacks
(made OF device iteration a bit more flexible on the way -- the search
can be restricted to subtree). Furthermore we really enter the kernel...
(Yay! :-) ... and crash in the first dprintf() (in the atomic_set()
called by acquire_spinlock()). kprintf() works, though.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15756 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 353d20c0c5f19d1120a8acb0f4f7f3b266da730f 27-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* libroot and the runtime loader are no longer built with kernel rules.
* New rule Ld, analogously to KernelLd.
* Added StaticLibrary parameter for supplying additional objects.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15191 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 38f62644541aaa3c1f4f363a3e3ab11b086b16d4 26-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Reorganized building of kernel, boot loader, and libroot.
Each component is built in the respective subdirectory now
and no longer in src/system/Jamfile.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15184 a95241bf-73f2-0310-859d-f6bbb57e9c96