Commit Graph

238 Commits

Author SHA1 Message Date
Jérôme Duval
84324de507 added an empty implementation of confstr()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-03 18:13:55 +00:00
Axel Dörfler
74c0424a43 * Added a mechanism to retrieve a BMessage with eventual error descriptions
for _kern_load_image().
* Added KMessage to the runtime_loader (a bit hacky, though) - it will use
  it to deliver the above mentioned functionality.
* load_dependencies() did return the wrong status code in case a library
  was missing; now it returns B_MISSING_LIBRARY.
* load_dependencies() will now try to load all dependencies when a report
  message is requested; therefore, all missing libraries are listed.
* Renamed uspace_program_args to user_space_program_args.
* The kernel filled in various members of the user_space_program_args structure
  unsafely, ie. was not using user_memcpy().
* Renamed some local variables in team.c to better fit our style guide (ie.
  uargs to userArgs).
* Changed Tracker to use the new _kern_load_image() variant on Haiku to retrieve
  and report all missing libraries. This fixes bug #1324.
* Adapted kernel_cpp.cpp to the runtime loader as well; the latter will now
  compile with _LOADER_MODE defined.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21715 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-27 02:32:19 +00:00
Marcus Overhagen
85b3a71e69 Check the pos parameter before calling into kernel.
This does prevent the unwanted side effect of reading or writing at the current 
file pointer position when the functions are called with a -1 position.
It's save to do this check in user space, because calling the _kern_* function
with -1 pos has the same effect as calling the normal read/write posix functions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-25 22:10:56 +00:00
Axel Dörfler
80b2c30e4f LOG_CONS is now also honoured when sending the message to the syslog daemon failed
(and not just because it doesn't run).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-04 14:06:20 +00:00
Jérôme Duval
583b66bf18 added trunc, truncf (and truncl on x86) from glibc
should help on bug #1260


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21350 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-08 18:33:02 +00:00
Axel Dörfler
88c66c0dfb * I broke create_path() with r21194; unlike strncpy(), strlcpy() needs enough space for
the terminating null byte as well. This fixes bug #1239.
* Using strlcpy() makes clearing the path buffer superfluous.
* Some more cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21239 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-25 11:06:25 +00:00
Axel Dörfler
261fd618fe * Now uses find_directory() when used inside the kernel.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21203 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-22 13:06:51 +00:00
Axel Dörfler
7be2dafba9 fs_write_attr() is supposed to remove an existing attribute value.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21202 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-22 09:24:19 +00:00
Axel Dörfler
6430c89618 * 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
2007-05-21 22:28:02 +00:00
Travis Geiselbrecht
621b401de4 set the function attribute on the asm memcpy.
This should fix the loader problem some folks were seeing on beos binaries.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20732 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-17 04:19:45 +00:00
Travis Geiselbrecht
831486a2d3 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
2007-04-16 06:17:14 +00:00
Travis Geiselbrecht
806f6f1161 fix a bug in _exit() that called the _IO_cleanup routine as if it was
a function pointer, which it isn't.
The mistake was probably made because there appears to be multiple stdio implementations
in the tree (BSD and glibc) so it's easy to look at the wrong code. Perhaps
we should clean that up.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20720 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-16 03:20:42 +00:00
Jérôme Duval
9e7de14057 added the usual weak symbols to fix bug #1134
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20566 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 20:56:57 +00:00
Ingo Weinhold
3f86eca54a Removed glibc's dprintf() from libroot.so. It clashes with the dprintf()
defined by the UserlandFS server and is of no real use anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20457 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-28 22:15:11 +00:00
Ingo Weinhold
44b5d72b5a Added new functions to the debugger API:
{set,clear}_debugger_{break,watch}point(), allowing to set/clear break
and watchpoints for the calling team. When a break/watchpoint is hit,
the team enters the debugger. Handy in situations when the program in
question can't really be started in a debugger (or it would be
complicated to do so). The functions work only as long as no debugger is
installed for the team.

We clear the arch specific team and thread debug infos now, when a new
debugger is installed, thus clearing break- and watchpoints.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20396 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-20 16:20:13 +00:00
Jérôme Duval
d4d9831990 merge both commpage.h into the private header
Travis, I hope this fits your needs :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20173 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-20 00:21:45 +00:00
François Revol
c8d3c6f470 Implemented get/setrlimit(RLIMIT_NOVMON). Note the kernel calls don't set errno... but they're called by user versions. Might want to split them if needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-19 15:48:02 +00:00
Travis Geiselbrecht
1cbf8f4b3c initial support for a commpage, which is a chunk of memory in high kernel space with user readonly permissions.
The first use is to let the kernel decide what the preferred syscall mechanism is at boot time and copy the
appropriate user space code there. Can be used for routines the kernel can decide best how to use (memcpy, some
timing routines, etc).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20161 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-19 00:32:44 +00:00
Ingo Weinhold
8d96648eab Fixed build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20134 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-15 18:59:45 +00:00
François Revol
158a9c384b Much simpler and safer ttyname() using B_GET_PATH_FOR_DEVICE. Also added ttyname_r for which we had a proto in the headers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20133 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-15 14:01:40 +00:00
Ingo Weinhold
2cddddacba Made _gHaikuRevision static and renamed it to sHaikuRevision.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20093 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-07 13:01:28 +00:00
Ingo Weinhold
a4e0c1d43d * We do now have a special "_haiku_revision" section in our libroot,
containing the Haiku SVN revision number which is used by uname(). The
  value is 0 when built, but updated by the build system before copying
  libroot to the image (new rule CopySetHaikuRevision).
* For AboutHaiku we no longer write the SVN revision number into a
  resource. Instead we use the uname() info.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20082 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-06 16:51:29 +00:00
Travis Geiselbrecht
ea4ff0f689 is_computer_on() lives again as a true syscall.
Replaced the _kern_null syscall with _kern_is_computer_on.
is_computer_on_fire is a bit harder, since it returns a float from kernelland, which
at the moment isn't supported in haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20069 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-04 21:08:35 +00:00
Jérôme Duval
bf63295e0b reverted changes from revision 7340, it seems to not be useful anymore.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20063 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-04 11:48:08 +00:00
Axel Dörfler
a83c8bbffa 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
2007-02-02 10:53:57 +00:00
Philippe Houdoin
7029621374 Added forgotten space between kernel build date and time.
Also prepare uname to return the build SVN revision number,
which will work only if I could figure out how to define it from Jamfile.
Or, better, in build/jam/BuildSetup. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20023 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-30 22:30:01 +00:00
Axel Dörfler
923ce6f922 * waitpid() now only clobbers _status in case it succeeded.
* improved comments and TODOs.
* added note about unimplemented WUNTRACED, and WCONTINUED options


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20011 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-29 15:45:34 +00:00
Axel Dörfler
1beeb96080 setpgrp() returns a pid_t, not an int.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20008 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-29 13:31:24 +00:00
Axel Dörfler
a9d09fc255 Added _kstatfs_() for binary compatibility with some BeOS apps (most notably, SoftwareValet).
We might want to remove it again once we have a replacement for it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19929 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-23 21:01:18 +00:00
Jérôme Duval
9481ed48de updated to tzcode2007a
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19755 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-09 23:16:26 +00:00
Axel Dörfler
6b507ddd46 Made set[e]gid() and set[e]uid() succeed in case they don't have anything to do.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19553 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-18 18:00:21 +00:00
Jérôme Duval
e20b9d2cf1 added missing asin asinf functions for ppc
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19500 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-13 21:06:18 +00:00
Axel Dörfler
a7854360ac Added vfork() as a wrapper to fork().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-13 14:50:14 +00:00
Axel Dörfler
489caaef82 setitimer() allows the second argument to be NULL.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19411 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-01 13:08:24 +00:00
Axel Dörfler
7f4e6824df Added a private call to get the dependencies of a loaded image. This will be used
to determine linkage of libnet.so vs. libsocket.so/libbind.so in the libnetwork.so.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19008 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-06 11:40:20 +00:00
Jérôme Duval
d75882bf8b finally add a good tmpfile function
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18890 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-19 14:31:40 +00:00
Jérôme Duval
13510b4105 added oldtmpfile.c to libroot.so, hopefully should fix bug #857
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18889 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-19 13:41:01 +00:00
Axel Dörfler
48096634af Enabled private BeOS syscalls for the build with GCC 4 as well for now, until
this issue has been solved in the code that needs them (which is the same as
the PPC version also does at this time).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18570 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-22 20:48:12 +00:00
Jérôme Duval
5ed5c96602 updated these files to glibc 2.3.5
hopefully it should fix bug #754


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18549 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-21 15:05:59 +00:00
Axel Dörfler
26a9fcd6ab * set_alarm() now correctly returns the time left for the currently active
alarm, or 0 if there isn't any.
* setitimer() now also sets the previous timer values correctly, so that
  alarm() and ualarm() now return the correct values as well - this fixes
  the test fork_9-1 failing at alarm().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-20 22:44:53 +00:00
Stefano Ceccherini
152808170e Reverted the previous change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18536 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-18 10:18:10 +00:00
Stefano Ceccherini
08c1246909 In case of error, errno should be set to a positive value. Yeah, I know,
it's sick.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-18 09:40:12 +00:00
Axel Dörfler
d024bdc9e6 kill() is supposed to return ESRCH instead of B_BAD_THREAD_ID.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18527 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-17 19:59:44 +00:00
Axel Dörfler
0240ccffa0 Don't use <new.h> - there is <new> for you.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-11 20:08:51 +00:00
Axel Dörfler
36788b7119 * Added strptime() to the build again,
* also defined STD_INSPIRED again, which lets localtime.c add some non-POSIX
  behaviour for now (needed by strptime()) - we should find a better solution
  to this, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18435 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-07 16:45:33 +00:00
Axel Dörfler
21470984c8 Added utimes() implementation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18330 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-01 11:02:32 +00:00
Axel Dörfler
05c0dde554 Uh, the reason why ping did only work once, was because set_alarm() did not call
the existing syscall...
The second ping now ends in a kernel panic, though 8-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18277 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-07-26 13:19:52 +00:00
Bruno G. Albuquerque
bcf475ec65 Made our version of is_computer_on_fire() behave like the BeOS one.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18259 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-07-25 00:26:03 +00:00
Axel Dörfler
89ae57ba77 Removed sysctl(), there is no need for this BSD-ish call.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17954 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-29 09:37:06 +00:00
Jérôme Duval
577bebe552 pthread_exit has to be called on thread exit, it doesn't return, thus we don't care about the routine return code
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-22 10:00:17 +00:00
Jérôme Duval
954f408f50 * PTHREAD_MUTEX_INITIALIZER inits to NULL, pthread_mutex_lock now call pthread_mutex_init to support this PTHREAD_MUTEX_INITIALIZER
* pthread_key_create and pthread_key_delete now manages correctly a list of key/destructor
* pthread_create now uses a private thread function to add a "on_exit_thread" call for destructors
* pthread_join now returns B_OK in every case, and, as a joinable thread could already be gone, wait_for_thread would not find it


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17895 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-21 14:07:34 +00:00
Axel Dörfler
7b3d36e5aa * BEntry::GetStat() and BNode::GetStat() used sizeof(struct stat) for the kernel
syscall, but they could not know if R5 code called them (in which case the stat
  size has a different size). We now always only return the R5 stat structure here.
  This fixes bug #420. We might want to find a different solution to this problem,
  though.
* Be got SYMLINK_MAX wrong - it's not the maximum number of links (that's SYMLOOP_MAX),
  but the maximum size of a symlink buffer. Added missing SYMLOOP_MAX and SYMLINK_MAX
  constants to limits.h.
* Fixes MAXSYMLINKS to use SYMLOOP_MAX, instead of SYMLINKS_MAX (which doesn't exist
  in POSIX specs, but we (intentionally) break source compatibility here).
* Reenabled the Haiku versions of stat(), fstat(), and lstat() when build for Haiku.
* Removed OpenBeOS namespace stuff from the files I touched.
* Removed superfluous StorageDefs.Private.h, whyever that ended up in a public header
  is beyond me.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17894 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-21 13:49:16 +00:00
Jérôme Duval
c345b8eb08 fix error return codes for posix compatibility
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17885 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-20 22:14:54 +00:00
Jérôme Duval
1f11178f97 added posix thread specific data functions
added a pthread_detach skeleton


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-20 12:27:46 +00:00
Jérôme Duval
a23efdfa79 added some pthread_* and pthread_attr_* naive functions
I mapped pthread_t to thread_id for simplicity


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17879 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-20 11:05:58 +00:00
Axel Dörfler
9f53e3dccf Fixed build for non-Haiku targets.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-16 14:32:05 +00:00
Axel Dörfler
2da9a41214 When calling debugger(), it will now (temporarily) dump a message to serial output
as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17760 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-07 15:11:39 +00:00
Axel Dörfler
0cd4c8ae6c Enabled sbrk() again, but only for actual increments.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-25 20:05:28 +00:00
Axel Dörfler
506c8fbbbf Disabled sbrk() since it doesn't seem to work yet (makes GDB crash).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17590 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-25 18:17:55 +00:00
François Revol
c2be814ab5 added an Haiku-specific RLIMIT (NumOpenVnodeMONitors) (UNIMPLEMENTED yet) (we might want to renumber it),
and used that one and NOFILE to implement R5 private calls _kset_[fd|mon]_limit_()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-22 19:37:40 +00:00
François Revol
3ad603ace4 implement sbrk() by calling hoard's version, through sbrk_hook (fct pointer was named this way in R5).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-22 18:04:20 +00:00
Axel Dörfler
8abee6571a libroot.so now builds on PPC again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17514 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-19 13:11:34 +00:00
Axel Dörfler
e2793c5db4 Fixed warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17512 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-19 13:05:56 +00:00
Axel Dörfler
d7b5138a70 Some more GCC 4.1.0 fixes, more to come (tomorrow).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17501 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-17 21:40:29 +00:00
Jérôme Duval
2a562c4223 raise now calls kill to have errno set correctly
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17493 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-17 15:46:47 +00:00
Jérôme Duval
a2762cadac hopefully handles bug #587
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17476 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-16 12:11:26 +00:00
Jérôme Duval
ad34885a2b actually set timezone in the kernel, and in the settings
should help on bug #583, and even fix it
minor change in localtime


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17441 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-13 15:52:32 +00:00
Jérôme Duval
c0acc2a55e fixed typo
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17403 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-09 19:56:29 +00:00
Axel Dörfler
d13fd67ac0 Imported lround() and lroundf() from glibc.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-09 18:12:35 +00:00
Marcus Overhagen
bba1e5c831 Added media kit error descriptions.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17369 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-08 18:35:08 +00:00
Axel Dörfler
2bbc6df8dc * The kernel now remembers the signal that killed a thread (if it was killed).
* As suggested by Korli, the signal is now encoded in the "reason" field of
  wait_for_child().
* waitpid() now sets the status passed in so that the signal can be read out
  (but it still doesn't do it's full job).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17338 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-05 15:33:34 +00:00
Jérôme Duval
ac3b691a1d enabled legacy re_comp re_exec
this fixes bug 563


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17337 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-05 14:28:46 +00:00
Jérôme Duval
b7b5cda158 updated gamma and gammaf
copied y0 y1 yn BeOS behaviour (even if the spec accepts both)
added ilogb ilogbf significand significandf (x86 and generic)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17248 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-27 19:04:30 +00:00
Axel Dörfler
d59df8688e fclose() should now accept a NULL parameter (doesn't clobber errno, though, as, at
least in theory, that should still contain the error from an earlier operation).
This might fix bug #500.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17228 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-24 23:18:14 +00:00
Jérôme Duval
966bf92369 removed excess NULL element
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17183 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-21 09:45:35 +00:00
Axel Dörfler
b2debb3777 Activated sigprocmask() (and really call the kernel syscall instead of itself...).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17176 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-20 12:24:39 +00:00
Axel Dörfler
1b2d6b4f2c initstate() and setstate() were disabled for some reason - they no longer are.
This fixes bug #289.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17025 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-06 07:06:04 +00:00
Axel Dörfler
805cb76ed8 * Added several R4.5 compatibility exports - they are now only compiled when GCC
2.95 is used.
* Added empty _klock_node_() syscall for compatibility - all R5 syscalls are now
  also only compiled with GCC 2.95.
* This should fix bug #403.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17011 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-05 10:48:47 +00:00
Axel Dörfler
99d94ad2e0 Added fegetround() and fesetround(), disabled special SSE support for the latter, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16835 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-18 20:32:17 +00:00
Axel Dörfler
66b7a0f477 Renamed the _kern_init_heap_address_range() syscall to _kern_reserve_heap_address_range()
and made it more powerful.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16825 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-18 12:52:01 +00:00
Axel Dörfler
70e8c1e7e2 Kernel still needs this.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-16 20:29:24 +00:00
Jérôme Duval
3b74cca68e replaced strlen with glibc optimized version i586 and powerpc32
if build fails, simply delete the object file posix_build.o manually


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-16 16:37:05 +00:00
Jérôme Duval
cc87b419b8 added posix_gnu_string
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16814 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-16 11:10:20 +00:00
Jérôme Duval
a34963f388 added posix_gnu_string
added more posix definitions


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16813 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-16 11:09:43 +00:00
Axel Dörfler
579c74ceb5 * Implemented a simple version of the private function mstats() (BeIDE needs it).
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16800 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-14 23:15:57 +00:00
Axel Dörfler
821d63fe0a * gettimeofday() now also fills in a passed in struct timezone, if any,
using the new _kern_get_timezone() syscall.
* Added an implementation of ftime() based on the above function, this
  may fix bug #308.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-14 14:36:46 +00:00
Axel Dörfler
3a8f1f31bd Implemented a very simplistic and slow leak checker as compile time option
(defaults to turned off).
To make any use of this, you have to call the __dump_allocated() function
at the point you want to check the leaks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16765 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-13 16:10:32 +00:00
Jérôme Duval
f357360c0e added more multibyte glibc functions
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16728 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-12 11:49:00 +00:00
Axel Dörfler
5370f52b15 setlocale() now returns "C" in case the locale is set to NULL.
This allows current VLC to run without the need of exporting one of the
LC_ALL/LC_CTYPE/LANG environment variables (it used to crash without this).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16571 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-02 18:34:13 +00:00
Axel Dörfler
22b4c9cace Added missing [l]lrint[f|l]() functions.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16570 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-02 17:55:26 +00:00
Jérôme Duval
5a2ad00cab fix a TODO in _user_mount : added an argsLength parameter
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16480 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-20 18:04:27 +00:00
Jérôme Duval
ba41c65055 added more math functions (complex ones)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16394 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-14 14:57:33 +00:00
Jérôme Duval
5acbf1f50e added more math functions (complex ones)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16392 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-14 13:34:43 +00:00
Jérôme Duval
162972f5f2 added missing wrappers from glibc 2.3.6
hopefully fix bug #157


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16391 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-14 13:06:48 +00:00
Jérôme Duval
c4d9fc29b5 fix bug #151
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16371 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-12 23:19:12 +00:00
Axel Dörfler
df213cedbc * CPUs can now be disabled - that is, they will keep idling.
* Added syscalls _kern_set_cpu_enabled() and _kern_cpu_enabled().
* scheduler.c::sRunQueue::tail was not maintained at all; changed sRunQueue to
  be a simple thread pointer instead of a struct thread_queue.
* Turns out we're monitoring CPU activity incorrectly when we've got more
  than one CPU.
* Renamed the global CPU array from "cpu" to gCPU.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 16:09:05 +00:00
Axel Dörfler
204131dc97 Added a real yield function to the kernel (using the next_priority approach).
The test application lets run a thread at the highest priority that calls
yield all the time - the system stays responsible when it runs, so it seems
to work fine :)
Changed the malloc implementation to use _kern_thread_yield() instead of
snoozing.
We should think about making this call public, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16166 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 02:29:02 +00:00
Axel Dörfler
7e46f8319e snooze(5) works more or less fine for standard threads, but is a very bad
idea for real-time threads. They could completely hog the CPU in this
case. Thanks to Marcus for investigating!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16161 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 00:11:51 +00:00
Axel Dörfler
979aeaf71c Fixed bug #97:
* BEntry::Remove() now uses _kern_remove_dir() for directories.
* Added fd parameter to _kern_remove_dir().
* Fixed LibBeAdapter's _kern_unlink() to only work on files, and
  added _kern_remove_dir() for directories.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16078 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-25 11:12:21 +00:00
Axel Dörfler
f7ba8efac9 Fixed GCC4 warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15867 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-08 13:09:31 +00:00