Commit Graph

4002 Commits

Author SHA1 Message Date
Axel Dörfler 10f0fc8f20 * Implemented sigwait().
* Not sure if it works as intended, as the specs are a bit vague.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24717 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-01 12:15:14 +00:00
Axel Dörfler c80e610789 * Added start of an implementation of pthread_cancel().
* Implemented pthread_setcanceltype(), pthread_setcancelstate(), and
  pthread_testcancel().
* In the previous commit, I also made pthread_private.h self-contained.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24710 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-31 18:49:19 +00:00
Maurice Kalinowski f4a2c0f945 put enum to appropiate place as pointed out by marcus
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24707 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-31 18:14:43 +00:00
Axel Dörfler a635399b07 * Rearranged pthread thread support a bit: there is now a pthread_thread
structure that is attached (via TLS) to each pthread.
* Implemented support for pthread_cleanup_{push|pop}().
* I haven't really been able to test these changes, yet, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24704 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-31 15:10:00 +00:00
Oliver Ruiz Dorantes 7976c871ff Add headers for the authentication and scan mode commands
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24698 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 21:43:59 +00:00
Oliver Ruiz Dorantes b426fc0487 - Modify API be more be like
- Polish a bit the classes composing the Discovery process




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 21:42:22 +00:00
Karsten Heimrich 1f604fd046 * should have been part of my last commit
* also renamed fCurrentHeader to fSpoolFileHeader


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24694 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 20:24:58 +00:00
Karsten Heimrich e0a750ce0b * rewrote header file
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24684 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 17:42:13 +00:00
Ingo Weinhold 1bc2fbc25d Added BSDish timer*() macros.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24683 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 17:28:31 +00:00
Jérôme Duval 7e11596a27 added athlon 64 model 3
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24677 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 12:27:41 +00:00
Axel Dörfler e549b218af This should have been part of r24675. Not sure what happened as I specified
the path on the commit line.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24676 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 11:42:32 +00:00
Axel Dörfler 6328832fba * Changed get_boot_item() API: it now also can retrieve the size of the boot
item entry.
* The bios_ia32 video platform code now stores the available VESA modes in
  the new vesa_modes kernel_args field.
* When configuring a VESA mode via settings file, it's no longer needed to
  specify the exact mode - the closest available mode is now used. This should
  help with bug #1962.
* frame_buffer_console_init() now also creates a boot_item for the VESA modes
  in the kernel_args.
* The VESA accelerant now filters the mode list to only contain modes that
  are actually supported.
* Moved non-shared vesa driver data into its own file vesa_private.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24675 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 11:01:41 +00:00
Ingo Weinhold 360be1fc45 * Implemented support for chroot:
- Added a "root" vnode to the io_context. It is used for resolving
    paths and converting nodes to paths instead of sRoot. Some more
    passing around of io_context structures was necessary.
  - Introduced a new lock sIOContextRootLock to protect
    io_context::root. The current uses of io_context::io_mutex
    (put_vnode(), remove_vnode() while holding it) looked too suspicious
    to use that mutex in vnode_path_to_vnode().
  - Added _kern_change_root() syscall and chroot() libroot function.
  - Added chroot coreutils program to the image. Funnily it seems to be
    much easier to set up a little jail than under Linux (just copy
    bash and libroot.so into respective subdirs; mount another pipefs
    if you want pipe support).
    With Haiku allowing direct access to directories via inode IDs
    jailing is obviously not very secure at the moment.
  - Added /var/empty to the image. It will be the chroot target for ssh.
* Changed vfs.cpp:get_cwd() so that the io_context::io_mutex is no
  longer held when calling dir_vnode_to_path().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24673 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 05:59:54 +00:00
Maurice Kalinowski 6938364b39 * Implemented BMediaRoster hooks GetRefFor, SetRefFor, SniffRefFor to access BFileInterface related file functions.
* Implemented BFileInterface class which was nearly empty so far. Added handling of messages passed to BFileInterface class.
* Added needed structs and message values to DataExchange.
* This is needed to get for instance the reader.media_addon to work. Usually one calls above functions to set a file to be decoded by the node. If the target is a consumer, they are used for setting the target for encoding data.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24671 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 01:35:58 +00:00
Ingo Weinhold 290946ce80 * Implemented some basics for supplementary groups support:
- The kernel stores the group IDs in the team structure. They are
    correctly inherited on fork() and load_image_etc().
  - Implemented getgroups() for real, i.e. it retrieves the groups
    associated with the process.
  - Implemented setgroups(), initgroups() and (the BSDish)
    getgrouplist(). The latter two read the group information from the
    "group database" /etc/group (if existing).
  - Change the BIND port config, since we do have getgrouplist() now.
* The set-uid feature was broken when the path to the executable was
  relative, since we used stat(), which, in the kernel, uses the kernel
  IO context.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24669 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 00:08:13 +00:00
Ingo Weinhold f244a07d99 Corrected value for _POSIX_NGROUPS_MAX.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24668 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-29 23:58:27 +00:00
Ingo Weinhold 8c117a6d88 Added function vfs_read_stat() that also allows for stat()ing files in
the user IO context from within the kernel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-29 23:57:34 +00:00
Ingo Weinhold 3bef7d0252 Added functions malloc_referenced[_{acquire,release}]() that implement
reference counted memory allocations. Can be used for sharing immutable
structures.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24666 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-29 23:55:34 +00:00
Maurice Kalinowski 999cd0acee * implemented BMediaRoster::StartControlPanel(). It queries a BControllable node with CONTROLLABE_START_CONTROL_PANEL message and returns the result to the caller (thx for help/suggestions from Marcus here). Needed to add appropiate structs and message value to DataExchange.h
* implemented BControllable::StartControlPanel(). The behaviour is supposed to be the one documented in the BeBook, meaning that it first checks if the BControllable node has been instantiated over an BMediaAddOn. If so, we investigate where the addon is located and try to launch it. Thus media_addons which have a control panel need to be compiled as an Application, not as an Addon. See r24664 as an example.
* inside BControllable::HandleMessage() call StartControlPanel for the message.
* MediaNodes having such a ControlPanel are rarely used as parameterwebs should provide you everything. But for instance the vst MediaAddOn uses it and some others do as well.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-29 20:53:01 +00:00
Ingo Weinhold 22611e781a Patch by Curtis Wanner:
* Added some limit macros.
* Removed the "L" suffix from [U]INT32_MAX.
* Reordered some definitions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24654 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-29 14:16:07 +00:00
Ingo Weinhold 29674ea8cb Patch by Vasilis Kaoutsis:
* Check against maximum baud rate in cfset{i,o}speed().
* Changed some functions comments to doxygen style.
* Sorted speed macros in termios.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24647 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-29 12:52:10 +00:00
Ingo Weinhold 79e1d3770c Not that I know what I'm doing...
Moved nameser_compat.h to our public headers (arpa/inet) and include in
<arpa/nameser.h>. That's solved similarly in BONE. At any rate OpenSSH
is now happy that HEADER exists.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24644 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-29 12:37:05 +00:00
Ingo Weinhold 479a926477 Define PF_LOCAL and PF_UNIX for compatibility reasons. Makes OpenSSH
happier.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24642 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-29 12:21:45 +00:00
Ingo Weinhold 0fddf2f088 Define howmany(). It seems to be what the BSDs are using. Linux
defines it, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24641 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-29 12:20:40 +00:00
Ingo Weinhold 5d2044f643 POSIX headers should not include BeOS/Haiku headers. Should help with
flex's pthread test.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-28 14:25:06 +00:00
Ingo Weinhold b564056dda GCC provides <stdbool.h>.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24617 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-28 07:42:07 +00:00
Ingo Weinhold 071f9c3aa2 Build configurations shouldn't be done in svn controlled files, so I
finally created a solution to avoid that: Header files that contain
configuration settings (and nothing else) go to build/config_headers.
To change settings, create a directory build/user_config_headers (which
is ignored by svn), copy the respective header there and modify it at
your leisure. Currently only tracing_config.h has been moved to the new
location, but more files will follow eventually. It is also recommended
to move optional macro definitions in Jamfile (as for BFS) to a config
header instead; the build system will then automatically rebuild on
changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24611 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-27 22:01:38 +00:00
Ingo Weinhold 781a715529 Move RegistrarThread[Manager].cpp to the registrar. There was no point
in those living in libbe.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24603 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-27 02:51:58 +00:00
Axel Dörfler 758962ec3b * Added arch_debug_contains_call() function that returns wether or not
a call chain contains a specific symbol (or address).
* Added a new KDL command "calling" that you can use to get a list of
  threads that have a specific function in their call chain.
* Removed extraneous white space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24594 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-26 17:08:51 +00:00
Ingo Weinhold da17e06b92 Small helper class for filtering file/path names.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24583 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-26 04:03:44 +00:00
Axel Dörfler 41f8d41647 Applied patch by Rene Gollent:
* Add a cached_pages field to the system_info structure, and change the
  meaning of the used_pages field to not include cached pages.
* Provide the needed info using the new calls vm_get_available_memory(),
  and vm_page_num_available_pages().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24571 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 11:51:45 +00:00
Ingo Weinhold c7c82420e1 _single_threaded should have C linkage. Was for some reason only a
problem with gcc 4.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24565 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 01:56:46 +00:00
Stephan Aßmus 9def3bf783 * Rewrote MediaRoster.h
* Removed appearantly unused satic variables. Hope this does not break
  binary compatibility, going to test.
* There are three more private methods, which could probably be removed
  as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 15:42:58 +00:00
Axel Dörfler a121b8c83c * Added a new flag for write stat: B_STAT_SIZE_INSECURE that allows a
file system to not fill newly created space with zeros. 
  BFile::SetSize() now uses this, while [f]truncate() does not. This
  is only a temporary work-around until BFS supports sparse files.
* Apps that want to reserve space to fill up later should use 
  BFile::SetSize() for now, as this will be a lot faster than 
  [f]truncate().
* cache_io() and the functions below now use a special mode when you 
  pass in a NULL buffer: for read access, the cache is only populated
  (useful for prefetching), for write access, the file is filled with
  zeros.
* Implemented BFS's Inode::FillGapWithZeros() using this method now.
* Removed extraneous white space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24555 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 13:39:02 +00:00
Axel Dörfler 5e2ef462ec * Got rid of the duality of FS_WRITE_STAT_* vs. B_STAT_* flags (removed
the former ones).
* Removed extraneous white space.
* net_server settings are now also updated when the size of the 
  file changed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24552 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 12:04:47 +00:00
Ingo Weinhold 5fd6637b4d * Decide whether to use BeOS style symbol resolution at run time
depending on the gcc version of the executable.
* Adjusted non-BeOS-style symbol resolution so that add-ons and
  dynamically loaded libraries find symbols in the executable.

This change re-enables support for undefined symbols.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24537 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 19:43:41 +00:00
Michael Pfeiffer 80339607f9 Get first and last page from job settings instead of print_file_header. In print_filer_header first_page is an offset into the spool file (the field is unused or reserved on BeOS R5 and is always -1) and page_count is the number of pages in the spool file. In the job settings first/last page is the page number of the first/last page as specified in the page setup dialog.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24536 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 18:01:13 +00:00
Michael Pfeiffer 242605b930 Set page_offset to -1 like BeOS R5 did.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24535 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 17:46:00 +00:00
Ingo Weinhold 3498280968 The runtime loader now reads a part of the .comment section of each
shared object to find out the GCC version it has been compiled with.
This is not an exact science, since we've got the version string for
every single object file that has been linked in, but my heuristic seems
to be good enough.

Having the gcc version at hand will allow for two features: Enabling
work-arounds for old executables (like the type info problem in BeOS
apps), and automatically selecting the right set of libraries in a mixed
gcc 2/gcc 4 environment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 17:01:42 +00:00
Karsten Heimrich e1656f01ae * build fix, removed leftover debug var...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24533 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 16:17:52 +00:00
Karsten Heimrich 96d23158ea * some small cleanup
* fFirstPage should be of type off_t



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 16:01:03 +00:00
Ingo Weinhold e26a4ce3e9 Define __THROW.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24531 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 01:21:53 +00:00
Ingo Weinhold 2754fa8772 bcopy() is supposed to be overlap-save.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-22 18:13:42 +00:00
Ingo Weinhold 8195a5a835 Prevent redefinition of _IO_MTSAFE_IO. It is defined when building the
legacy gcc's libio.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24524 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-22 15:26:55 +00:00
Bruno G. Albuquerque 7a66a9b8e4 - Added support in system info for extended cpu family and model.
- Take extended family and model into account when generating the cpu
  type and revision.
- Added Intel Core 2 Extreme to the cpu list.

Please review.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-21 16:44:05 +00:00
Stephan Aßmus d830aa92ce * Added FindKeyFrame() method to MediaExtractor, it is similar to Seek(),
but operates "read-only".
* Added FindKeyFrame() method to ReaderPlugin, see above.
* Reformated ReaderPlugin header. Added const qualifier to Source() method.
* Small cleanups in BMediaTrack::SeekToTime() and SeekToFrame(). Added TODOs
  with regards to "seeking" in decoders, wich should IMHO be revised. (Codecs
  cannot seek in the stream, they only get fed chunk data. The only thing they
  can do is reset themselves in preparation for a discontinuity of the chunk
  data...)
* Implemented BMediaTrack::FindKeyframeByXX() methods via the new
  MediaExtractor::FindKeyFrame() method.
* Implemented Seek() and FindKeyFrame() methods in the Reader base class,
  returning B_NOT_SUPPORTED. I think this makes sense and also I don't have
  to adapt all existing Reader plugins for the new FindKeyFrame() call. :-)
* Implemeneted FindKeyFrame() in the avi_reader. The OpenDMLFile class
  gets Seek() extended for a "read-only" mode. Currently the implementation
  is broken (as before) with regards to keyframes. These were ignored before
  and I have not changed them to actually support the seek flags with regards
  to keyframes. That's the interesting TODO...
* Some reformatting here and there in avi_reader code, sorry for the mixup.
  The only actual change is the support for the read-only flag to Seek().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24495 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-20 23:36:14 +00:00
Axel Dörfler a886f802fc * Added debug_screen_output_enabled() function.
* The boot splash code now checks wether debug screen output is enabled or not
  using the above function.
* The boot splash code no longer maps it's own copy of the frame buffer, instead,
  it will use the boot item feature as the VESA driver does. Also removed the
  lock, as that's not needed at all.
* Renamed splash.cpp to boot_splash.cpp, and boot/splash.h to boot_splash.h
  (it's not part of the boot loader, but the kernel).
* Removed dead code from boot_splash.cpp, added license. Replaced license
  header in boot_splash.h to a style guide conforming one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-20 11:10:17 +00:00
Ingo Weinhold 8560d1885b * The runtime_loader's test_executable() no longer analyzes the
executable permissions of the file by hand. We use _kern_access()
  instead, which also handles the root case correctly.
* The user and group arguments of test_executable() aren't needed any
  longer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-20 01:45:00 +00:00
Stephan Aßmus 4a46d818c9 * Implemented ERROR as fprintf(stderr, ...) with tracing turned off as well.
* Fixed all but one compiler warnings in libmedia.so.
* Truncated lines to 80 char width where I looked at code.
* Turned printf()s into TRACE/ERROR calls in MediaExtractor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24478 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-19 19:39:07 +00:00
Stephan Aßmus c844c20840 * Use tracing facilities in BMediaTrack.
* Turn off tracing in the Media Kit.
* Notify of unimplemented functions regardless of tracing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24473 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-19 17:12:05 +00:00