summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Add sysctl kern.sched.cpusetsize to export the size of kernel cpuset,davidxu2010-10-291-0/+1
| | | | | | also add sysconf() key _SC_CPUSET_SIZE to get sysctl value. Submitted by: gcooper
* Add pthread_rwlockattr_setkind_np and pthread_rwlockattr_getkind_np, thedavidxu2010-10-181-2/+14
| | | | | | | | | functions set or get pthread_rwlock type, current supported types are: PTHREAD_RWLOCK_PREFER_READER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, PTHREAD_RWLOCK_PREFER_WRITER_NP, default is PTHREAD_RWLOCK_PREFER_WRITER_NONCECURSIVE_NP, this maintains binary compatible with old code.
* Also the stop function should accept 64-bit exception class.davidxu2010-09-301-1/+1
|
* - Sizeof exception class type should always be 64-bit.davidxu2010-09-301-3/+5
| | | | - Make some functions be visible to BSD source code.
* Import unwind.h from libunwind-0.99.davidxu2010-09-301-0/+154
| | | | Approved by: core (kib, rwatson, imp, brooks)
* In current code, statically initialized and destroyed object havedavidxu2010-09-281-1/+1
| | | | | | | | same null value, the code can not distinguish between them, to fix the problem, now a destroyed object is assigned to a non-null value, and it will be rejected by some pthread functions. PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP is changed to number 1, so that adaptive mutex can be statically initialized correctly.
* Correct value for _POSIX_AIO_LISTIO_MAX in <limits.h>.jilles2010-08-291-1/+1
| | | | | | | | | | All the "Minimum Values" (POSIX.1-2008 XBD 13 Headers <limits.h>) are now correct. These should all be exactly as they are in the specification; the possibly higher values we support are announced differently. PR: standards/104743 Submitted by: gcooper MFC after: 2 weeks
* MFtbemd:imp2010-08-231-2/+2
| | | | | Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want to test of all the CPUs of a given family conform.
* Style: tabs after #definekevlo2010-08-111-1/+1
|
* Remove stale reference to UT_NAMESIZE from <stdio.h>.ed2010-08-061-2/+1
| | | | Spotted by: bde@
* Connect powerpc64 to the build. It is not presently part of make universe,nwhitehorn2010-07-131-3/+3
| | | | | | which will be added soon. Reviewed by: imp
* o addr2ascii(3) was removed ages ago. Fix the comment.maxim2010-07-061-1/+1
| | | | | | PR: docs/148383 Submitted by: pluknet MFC after: 1 week
* libedit: Allow simple quoting in filename completion.jilles2010-06-151-0/+1
| | | | | | | | | | | | | The completer recognizes characters escaped with backslashes as being literal parts of a word, and adds backslashes to avoid almost all misinterpretation. In particular, filenames containing spaces can be completed correctly. For bug compatibility with the NetBSD version, the improved completion function has a new name, _el_fn_sh_complete, and _el_fn_complete is unchanged. Submitted by: Guy Yur
* libedit: Add basic filename completion code from NetBSD.jilles2010-06-131-2/+0
| | | | | | | | | | | | This will be used to provide filename completion in sh(1). Changes from the NetBSD code: * wide character support disabled, as in the rest of libedit * config.h and related portability stuff reduced/disabled, as in the rest of libedit Submitted by: Guy Yur Obtained from: NetBSD
* Move realpath(3) prototype to a POSIX section.kib2010-04-211-1/+1
| | | | | Noted by: bde MFC after: 2 weeks
* Slightly modernize realpath(3).kib2010-04-201-1/+1
| | | | | | | | | | | SUSv4 requires that implementation returns EINVAL if supplied path is NULL, and ENOENT if path is empty string [1]. Bring prototype in conformance with SUSv4, adding restrict keywords. Allow the resolved path buffer pointer be NULL, in which case realpath(3) allocates storage with malloc(). PR: kern/121897 [1] MFC after: 2 weeks
* Add capability to use a db version of services. It is enabled byume2010-04-042-0/+2
| | | | | | specifying `db' as source of service in /etc/nsswitch.conf. MFC after: 2 weeks
* Be like stdlib.h and bring in a wchar_t definition and use it to prototypejmallett2010-03-311-4/+11
| | | | | | | | | | | wcstoimax and wcstoumax, rather than spelling it __wchar_t. This is necessary to use these functions in C++ where wchar_t is different to __wchar_t and is a built-in type. It may be better to use __wchar_t here and to simply define __wchar_t as being wchar_t in C++ mode rather than to bring in wchar_t, but this is less invasive and follows our existing practice, and restores wchar_t usage in this file to what it was before r1.8.
* - Remove const'ness from dlerror(3) prototype, for consistency with POSIX.gahr2010-03-241-2/+1
| | | | | Approved by: cognet MFC after: 1 week
* Trim down libcompat by removing <regexp.h>.ed2010-03-142-71/+1
| | | | | | | | | | | | | | | Erwin ran an exp-run with libcompat and <regexp.h> removed. It turns out the regexp library is almost entirely unused. In fact, it looks like it is sometimes used by accident. Because these function names clash with libc's <regex.h>, some application use both <regex.h> and libcompat, which means they link against the wrong regex library. This commit removes the regexp library and reimplements re_comp() and re_exec() using <regex.h>. It seems the grammar of the regular expressions accepted by these functions is similar to POSIX EREs. After this commit, 1 low-profile port will be broken, but the maintainer already has a patch for it sitting in his mailbox.
* Add warnings to <regexp.h> and <sys/timeb.h>.ed2010-03-091-0/+4
| | | | | | | | | These header files only provide functionality that can be used in combination with libcompat. In order to prevent people from including them without any actual use (which happens a lot with <sys/timeb.h>), put a warning here to make people more aware. This means we have to lower WARNS for libcompat, which is no big deal.
* Remove last traces of <utmp.h>.ed2010-03-032-3/+1
|
* Remove clause 3 from Berkeley copyrights. Add a few $FreeBSD$'s.imp2010-02-1611-55/+17
|
* Remove the Berkeley clause 3's.imp2010-02-1644-216/+54
| | | | Add a few $FreeBSD$
* Remove NetBSD Foundation clauses 3 & 4. They eliminated those clausesimp2010-02-165-35/+0
| | | | last year.
* Add gmountver, disk mount verification GEOM class.trasz2010-01-161-1/+1
| | | | | | | | Note that due to e.g. write throttling ('wdrain'), it can stall all the disk I/O instead of just the device it's configured for. Using it for removable media is therefore not a good idea. Reviewed by: pjd (earlier version)
* Phase out ttyslot(3).ed2010-01-141-1/+0
| | | | | | | | The ttyslot() function was originally part for SUSv1, marked LEGACY in SUSv2 and removed later on. This function only makes sense when using utmp(5), because it was used to determine the offset of the record for the controlling TTY. It makes little sense to keep it here, because the new utmpx file format doesn't index based on TTY slots.
* Remove <utmp.h> and its corresponding manual page.ed2010-01-131-73/+2
|
* Implement <utmpx.h>.ed2010-01-132-2/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The utmpx interface is the standardized interface of the user accounting database. The standard only defines a subset of the functions that were present in System V-like systems. I'd like to highlight some of the traits my implementation has: - The standard allows the on-disk format to be different than the in-memory representation (struct utmpx). Most operating systems don't do this, but we do. This allows us to keep our ABI more stable, while giving us the opportunity to modify the on-disk format. It also allows us to use a common file format across different architectures (i.e. byte ordering). - Our implementation of pututxline() also updates wtmp and lastlog (now called utx.log and utx.lastlogin). This means the databases are more likely to be in sync. - Care must be taken that our implementation discard any fields that are not applicable. For example, our DEAD_PROCESS records do not hold a TTY name. Just a time stamp, a record identifier and a process identifier. It also guarantees that strings (ut_host, ut_line and ut_user) are null terminated. ut_id is obviously not null terminated, because it's not a string. - The API and its behaviour should be conformant to POSIX, but there may be things that slightly deviate from the standard. This implementation uses separate file descriptors when writing to the log files. It also doesn't use getutxid() to search for a field to overwrite. It uses an allocation strategy similar to getutxid(), but prevents DEAD_PROCESS records from accumulating. Make sure libulog doesn't overwrite the manpages shipped with our C library. Also keep the symbol list in Symbol.map sorted. I'll bump __FreeBSD_version later this evening. I first want to convert everything to <utmpx.h> and get rid of <utmp.h>.
* Move scandir(3) and alphasort(3) into XSI namespace.kib2010-01-051-2/+4
| | | | | Noted and reviewed by: bde MFC after: 2 weeks
* Use umtx to implement process sharable semaphore, to make this work,davidxu2010-01-052-2/+66
| | | | | | | | | | | | | | | | | | | | | | now type sema_t is a structure which can be put in a shared memory area, and multiple processes can operate it concurrently. User can either use mmap(MAP_SHARED) + sem_init(pshared=1) or use sem_open() to initialize a shared semaphore. Named semaphore uses file system and is located in /tmp directory, and its file name is prefixed with 'SEMD', so now it is chroot or jail friendly. In simplist cases, both for named and un-named semaphore, userland code does not have to enter kernel to reduce/increase semaphore's count. The semaphore is designed to be crash-safe, it means even if an application is crashed in the middle of operating semaphore, the semaphore state is still safely recovered by later use, there is no waiter counter maintained by userland code. The main semaphore code is in libc and libthr only has some necessary stubs, this makes it possible that a non-threaded application can use semaphore without linking to thread library. Old semaphore implementation is kept libc to maintain binary compatibility. The kernel ksem API is no longer used in the new implemenation. Discussed on: threads@
* This should read #if __BSD_VISIBLE instead of #ifdef __BSD_VISIBLE.ed2010-01-041-1/+1
|
* Modernize scandir(3) and alphasort(3) interfaces according to the IEEEkib2010-01-041-2/+3
| | | | | | | | | | | | | | | | | | | | Std 1003.1-2008. Both Linux and Solaris conforms to the new definitions, so we better follow too (older glibc used old BSDish alphasort prototype and corresponding type of the comparision function for scandir). While there, change the definitions of the functions to ANSI C and fix several style issues nearby. Remove requirement for "sys/types.h" include for functions from manpage. POSIX also requires that alphasort(3) sorts as if strcoll(3) was used, but leave the strcmp(3) call in the function for now. Adapt in-tree callers of scandir(3) to new declaration. The fact that select_sections() from catman(1) could modify supplied struct dirent is a bug. PR: standards/142255 MFC after: 2 weeks
* Remove the current directory from _PATH_STDPATH.jilles2009-12-301-1/+1
|
* Don't name parameters, for consistency with the rest of the file, and becausecognet2009-12-221-6/+6
| | | | | | it breaks third-party apps. Submitted by: gahr
* Decompose <sys/termios.h>.ed2009-11-282-2/+102
| | | | | | | | | | | | | | | | | | | | The <sys/termios.h> header file is hardlinked to <termios.h>. It contains both the structures and the flag definitions, but also the C library interface that's implemented by the C library. This header file has the typical problem of including too many random things and being badly ordered. Instead of trying to fix this, decompose it into two header files: - <sys/_termios.h>, which contains struct termios and the flags. - <termios.h>, which includes <sys/_termios.h> and contains the C library interface. This means userspace has to include <termios.h> for struct termios, while kernelspace code has to include <sys/tty.h>. Also add a <sys/termios.h>, which prints a warning message before including <termios.h>. I am aware that there are some applications that use this header file as well.
* Implement sighold, sigignore, sigpause, sigrelse, sigset functionskib2009-11-261-1/+6
| | | | | | | | | | from SUSv4 XSI. Note that the functions are obsoleted, and only provided to ease porting from System V-like systems. Since sigpause already exists in compat with different interface, XSI sigpause is named xsi_sigpause. Reviewed by: davidxu MFC after: 3 weeks
* Add basename_r(3) to complement basename(3). basename_r(3) which acceptsrwatson2009-10-061-0/+1
| | | | | | | | a caller-allocated buffer of at least MAXPATHLEN, rather than using a global buffer. MFC after: 1 month Sponsored by: Google
* Modified locale(1) to be able to show the altmon_X fields and the [cxX]_fmt's.edwin2009-10-051-0/+14
| | | | | | Also modify the "-k list" option to display only fields with a certain prefix. MFC after: 1 week
* ntroduce mfiutil, a basic utility for managing LSI SAS-RAID & Dell PERC5/6scottl2009-08-131-1/+1
| | | | | | | | | | | | | | controllers. Controller, array, and drive status can be checked, basic attributes can be changed, and arrays and spares can be created and deleted. Controller firmware can also be flashed. This does not replace MegaCLI, found in ports, as that is officially sanctioned and supported by LSI and includes vastly more functionality. However, mfiutil is open source and guaranteed to provide basic functionality, which can be especially useful if you have a problem and can't get MegaCLI to work. Approved by: re Obtained from: Yahoo! Inc.
* Implement RTLD_NOLOAD flag for dlopen(3).kib2009-07-171-0/+1
| | | | | | Requested and tested by: jkim Reviewed by: kan Approved by: re (kensmith)
* Separate the parallel scsi knowledge out of the core of the XPT, andscottl2009-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modularize it so that new transports can be created. Add a transport for SATA Add a periph+protocol layer for ATA Add a driver for AHCI-compliant hardware. Add a maxio field to CAM so that drivers can advertise their max I/O capability. Modify various drivers so that they are insulated from the value of MAXPHYS. The new ATA/SATA code supports AHCI-compliant hardware, and will override the classic ATA driver if it is loaded as a module at boot time or compiled into the kernel. The stack now support NCQ (tagged queueing) for increased performance on modern SATA drives. It also supports port multipliers. ATA drives are accessed via 'ada' device nodes. ATAPI drives are accessed via 'cd' device nodes. They can all be enumerated and manipulated via camcontrol, just like SCSI drives. SCSI commands are not translated to their ATA equivalents; ATA native commands are used throughout the entire stack, including camcontrol. See the camcontrol manpage for further details. Testing this code may require that you update your fstab, and possibly modify your BIOS to enable AHCI functionality, if available. This code is very experimental at the moment. The userland ABI/API has changed, so applications will need to be recompiled. It may change further in the near future. The 'ada' device name may also change as more infrastructure is completed in this project. The goal is to eventually put all CAM busses and devices until newbus, allowing for interesting topology and management options. Few functional changes will be seen with existing SCSI/SAS/FC drivers, though the userland ABI has still changed. In the future, transports specific modules for SAS and FC may appear in order to better support the topologies and capabilities of these technologies. The modularization of CAM and the addition of the ATA/SATA modules is meant to break CAM out of the mold of being specific to SCSI, letting it grow to be a framework for arbitrary transports and protocols. It also allows drivers to be written to support discrete hardware without jeopardizing the stability of non-related hardware. While only an AHCI driver is provided now, a Silicon Image driver is also in the works. Drivers for ICH1-4, ICH5-6, PIIX, classic IDE, and any other hardware is possible and encouraged. Help with new transports is also encouraged. Submitted by: scottl, mav Approved by: re
* There is an optimization in chmod(1), that makes it not to call chmod(2)trasz2009-07-081-0/+1
| | | | | | | | | | | | | if the new file mode is the same as it was before; however, this optimization must be disabled for filesystems that support NFSv4 ACLs. Chmod uses pathconf(2) to determine whether this is the case - however, pathconf(2) always follows symbolic links, while the 'chmod -h' doesn't. This change adds lpathconf(3) to make it possible to solve that problem in a clean way. Reviewed by: rwatson (earlier version) Approved by: re (kib)
* Merge fmtcheck() prototype change.delphij2009-06-231-1/+1
| | | | Obtained from: NetBSD
* Re-do r192913 in less intrusive way. Only do IP_RECVDSTADDR/IP_SENDSRCADDRkan2009-06-181-0/+1
| | | | | | | | | | | | | dace for UPDv4 sockets bound to INADDR_ANY. Move the code to set IP_RECVDSTADDR/IP_SENDSRCADDR into svc_dg.c, so that both TLI and non-TLI users will be using it. Back out my previous commit to mountd. Turns out the problem was affecting more than one binary so it needs to me addressed in generic rpc code in libc in order to fix them all. Reported by: lstewart Tested by: lstewart
* Add a new 'void closefrom(int lowfd)' system call. When called, it closesjhb2009-06-151-0/+1
| | | | | | | | | | | | | | | | | | | | any open file descriptors >= 'lowfd'. It is largely identical to the same function on other operating systems such as Solaris, DFly, NetBSD, and OpenBSD. One difference from other *BSD is that this closefrom() does not fail with any errors. In practice, while the manpages for NetBSD and OpenBSD claim that they return EINTR, they ignore internal errors from close() and never return EINTR. DFly does return EINTR, but for the common use case (closing fd's prior to execve()), the caller really wants all fd's closed and returning EINTR just forces callers to call closefrom() in a loop until it stops failing. Note that this implementation of closefrom(2) does not make any effort to resolve userland races with open(2) in other threads. As such, it is not multithread safe. Submitted by: rwatson (initial version) Reviewed by: rwatson MFC after: 2 weeks
* Delete the old USB stack. The new stack has settled in and has all thethompsa2009-05-271-1/+1
| | | | drivers/functionality and then some.
* Modify src/etc/mtree/BSD.include.dist and src/include/Makefilermacklem2009-05-211-1/+1
| | | | | | | | | | | | | | | | | so that the .h files in src/sys/fs/nfs will be installed under /usr/include/fs/nfs. This will allow the following utilities to build, once additions and changes for the experimental nfs subsystem are committed: usr.sbin/mountd - Once modified to add support for the experimental nfs subsystem. ur.sbin/nfsstat - Once modified to add support for the experimental nfs subsystem. usr.sbin/nfscbd - The client side callback daemon for NFSv4. usr.sbin/nfsuserd - The NFSv4 user/group name<->uid/gid mapping daemon. usr.sbin/nfsdumpstate - The NFSv4 utility for dumping open/lock state. usr.sbin/nfsrevoke - The sysadmin command for revoking NFSv4 state. Approved by: kib (mentor)
* Revert r190943, since the problem in ports seems to be fixed now.das2009-04-171-2/+0
| | | | | It's amazing how a well-placed eyesore generates more motivation in a day than email generates in three weeks.
* GNU Pth has some fragile kludges that were broken by r189828.das2009-04-111-0/+2
| | | | | | I've discussed this with the Pth maintainer and no clear solution has emerged on the ports side of things, so for now, hack around the issue in signal.h.
OpenPOWER on IntegriCloud