- Reimplemented mutex to use the _kern_mutex*() syscalls.
- The initializer functions cannot fail anymore -- changed their return type
to void.
- Changed the initializer function semantics to not copy the name by default
anymore (as in the kernel). Also added *_etc() versions of them that take an
additional flags.
- Added static initializer macros.
- Made the mutex (and thus recursive_lock) lock functions non-interruptable.
- Got rid of the "lazy" version. They are no longer needed, since the
initialization of the standard types can be done statically and cannot fail.
* Adjusted libroot, runtime loader, and other code using the private libroot
locking primitives to the new semantics.
* pthreads mutexes and condition variables:
- Reimplemented using the _kern_mutex*() syscalls.
- Consistently use POSIX error codes.
- Fixed some not quite POSIX compliant behavior.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36323 a95241bf-73f2-0310-859d-f6bbb57e9c96
* added a TODO questioning the closing master and slave in openpty() when applying window size fails.
* added TIOCSCTTY as a TTY ioctl code, the caller become controlling TTY. Review comments are welcome.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36105 a95241bf-73f2-0310-859d-f6bbb57e9c96
the heap debug panics. Instead syslog output is generated if turned off.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35481 a95241bf-73f2-0310-859d-f6bbb57e9c96
well as the thread allocating it. Can for example be used to verify that an
object or buffer is as large as expected.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35480 a95241bf-73f2-0310-859d-f6bbb57e9c96
keeping all returned heap memory in the 0xdeadbeef state (including the
first sizeof(void *) bytes otherwise for the free list). While wasting a lot
of memory it allows you to rely on 0xdeadbeef being always present as no
future allocation will reuse the freed memory block.
* Also added heap_debug_malloc_with_guard_page() which is intended to allocate
a memory block so it is aligned that the start of invalid memory past the
allocation is in an unmapped guard page. However the kernel backend that would
guarantee this is not yet implemented, so right now this works only by chance
if no other area happens to be allocated exactly past the created one. With a
very specifc suspicion you can put that one allocation you get to good use
though. It causes a crash when accessing memory past the allocation size so
you actually get a backtrace from where the access happened instead of only
after freeing/wall checking.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35478 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Moving some functions around, removing and adding others for the public API.
I've written a blog post at haiku-os.org to go as documentation for this
introducing the API and the other helpful bits.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35431 a95241bf-73f2-0310-859d-f6bbb57e9c96
* This should get most IPv6 applications to link (they just can't open IPv6
sockets yet, as the protocol is missing).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35326 a95241bf-73f2-0310-859d-f6bbb57e9c96
implemented fully in order not to fool ported software into believing this
API can be used.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35291 a95241bf-73f2-0310-859d-f6bbb57e9c96
typedef'd to the existing vregs type. Applies #5324. Thanks a lot!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35287 a95241bf-73f2-0310-859d-f6bbb57e9c96
header. This shall ensure uniqueness of the ioctls.
* Added a special SIOCEND define to Haiku's sockio.h, so that drivers can define
private ioctls as can be seen in src/add-ons/kernel/drivers/network/wlan/atheros/dev/ath/if_athioctl.h.
* Modified ioccom.h of the FreeBSD compat layer, to make use of the special
SIOCEND define.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34612 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Implemented renameat(), faccessat(), fchownat(), fchmodat(), and mkfifoat().
* Added stub for mknodat().
* The kernel backend for faccessat() does not yet differentiate between
effective and real user/group IDs, though.
* Removed B_ENABLE_INCOMPLETE_POSIX_AT_SUPPORT, as we now support everything
(more or less). This also closes ticket #4928.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34288 a95241bf-73f2-0310-859d-f6bbb57e9c96
(O_MOUNT, O_EXLOCK, and O_SHLOCK). I only left the non-standard O_TEMPORARY
for the time being (as it shouldn't fool anyone).
* Fixed libutil that already used O_EXLOCK, even though it did not do anything.
* Moved O_NOCACHE, and O_NOFOLLOW to the section with implemented modes.
* Added O_DIRECTORY.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34278 a95241bf-73f2-0310-859d-f6bbb57e9c96
and types.h. The idea is to provide a basic architecture/compiler
abstraction by defining types and macros that allow the posix/ and os/
headers to be mostly architecture/compiler agnostic.
* Adjusted the posix/ and os/ headers accordingly.
* <SupportDefs.h>: Introduced B_PRI* and B_SCN* macros similar to the PRI*
and SCN* macros defined in <inttypes.h>, just for the BeOS/Haiku [u]int*
types and some POSIX types (e.g. off_t, dev_t, ino_t) that don't have POSIX
macros. Also the B_PRI* and B_SCN* macros are available unconditionally,
unlike the <inttypes.h> macros, which require __STDC_FORMAT_MACROS to be
defined in C++ mode.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34214 a95241bf-73f2-0310-859d-f6bbb57e9c96
obviously POSIX got it wrong, as socklen_t hardly makes sense here).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34004 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Resurrected the __inet* prefix for binary compatibility with older Haiku
versions - this could be a temporary solution in case we want to export the
inet_* functions not just as weak symbols. In that case, the __inet* versions
would be dropped.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34003 a95241bf-73f2-0310-859d-f6bbb57e9c96
as long as the full set hasn't been implemented. They are guarded by the
B_ENABLE_INCOMPLETE_POSIX_AT_SUPPORT macro until then. Fixes the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33990 a95241bf-73f2-0310-859d-f6bbb57e9c96
directory, where they were misplaced, and joined them to fcntl.cpp.
* Added openat().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33976 a95241bf-73f2-0310-859d-f6bbb57e9c96
B_COMMON_SETTINGS_DIRECTORY/network/hosts.
* Moved the location of the "services" file to
B_COMMON_DATA_DIRECTORY/network/services.
* Removed headers I forgot to remove.
* Made getnameinfo() use socklen_t internally as well.
* Removed _PATH_* constants from netdb.h that we don't deliver anymore.
* Automatic whitespace cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33972 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Got rid of the TLS/multi-thread hacks of the previous port.
* Took over irs/lcl_sv.cpp, and irs/lcl_ho.c, and irs/lcl_pr.c from the previous
version as they contain customizations.
* Removed unused files from libbind.
* Only barely tested, so beware.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33968 a95241bf-73f2-0310-859d-f6bbb57e9c96
* copied implementations for llround(), llroundf() and llroundl() from
glibc-2.3.2
* added corresponding declarations to math.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33863 a95241bf-73f2-0310-859d-f6bbb57e9c96
really something to play with without knowing the outcome.
* Fixed indentation/coding style violations introduced with r33783. Please take
more care when accepting patches!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33787 a95241bf-73f2-0310-859d-f6bbb57e9c96