summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Schedule spinlocked threads by moving them through the work queue, insteadmini2002-11-242-4/+30
| | | | | | | of the wait queue. Approved by: re (blanket) Stolen from: davidxu
* Get the wall clock time from the KSE mailbox, rather than doing anothermini2002-11-242-4/+4
| | | | syscall.
* Directly load %edx from mailboxdavidxu2002-11-231-4/+3
|
* Describe newly added fields in the KSE and thread mailboxes.archie2002-11-221-0/+28
| | | | Approved by: re
* Document the `label' capability.chris2002-11-221-0/+2
| | | | | | Approved by: re Sponsored by: DARPA, Network Associates Labs Obtained from: TrustedBSD Project
* In _thread_enter_uts, fix eflags saving bug.davidxu2002-11-223-8/+17
| | | | | | | | In _thread_switch, set current thread pointer in kse mailbox only after all registers copied out of thread mailbox, kernel will do upcall at trap time, if set current thread pointer before loading all registers from thread mailbox, at trap time, the thread mailbox data will be overwritten by kernel, result is junk data is loaded into CPU.
* Fix idle timeout bug, use correct current time of day.davidxu2002-11-202-4/+4
|
* libc_r wasn't so tied to libc for 22 months.ru2002-11-1831-153/+107
|
* This file has reincarnated as src/include/uuid.h with a whole newmarcel2002-11-181-59/+0
| | | | future ahead of it.
* libc header files are normally in src/include. Therefore, uuid.h hasmarcel2002-11-181-2/+0
| | | | | | | | | | been repo-copied from src/lib/libc/uuid to src/include. Update the makefiles. While in src/include/Makefile, reformat and resort INCS. Reverting the functional change only involves removing uuid.h. Pompted by: ru
* Adjust code for new mailbox format.davidxu2002-11-182-6/+6
| | | | Reviewed by: deischen, mini
* Oops. Some ut_time stuff slipped through the cracks. These turned outpeter2002-11-172-2/+4
| | | | to be non-fatal due to stack alignment roundups.
* Update SYNOPSIS to reflect the standardized header. Add STANDARDSmike2002-11-171-4/+13
| | | | | | section. PR: 43270
* - Ease sanity check to get cylinders.nyan2002-11-171-6/+12
| | | | - Get the slice name from the result of kern.geom.conftxt.
* goto break; != break;dougb2002-11-171-3/+3
| | | | | | I've no idea if this is the right behavior for the library, but this at least fixes the build, and matches what seems to be alfred's intent in the commit message for 1.19.
* Rework the sysconf(3) interaction with aio:alfred2002-11-171-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | sysconf.c: Use 'break' rather than 'goto yesno' in sysconf.c so that we report a '0' return value from the kernel sysctl. vfs_aio.c: Make aio reset its configuration parameters to -1 after unloading instead of 0. posix4_mib.c: Initialize the aio configuration parameters to -1 to indicate that it is not loaded. Add a facility (p31b_iscfg()) to determine if a posix4 facility has been initialized to avoid having to re-order the SYSINITs. Use p31b_iscfg() to determine if aio has had a chance to run yet which is likely if it is compiled into the kernel and avoid spamming its values. Introduce a macro P31B_VALID() instead of doing the same comparison over and over. posix4.h: Prototype p31b_iscfg().
* Implement the lock with a cmpxchg instruction instead of a xchg.marcel2002-11-161-2/+3
| | | | | | | | | | Both are atomic, but the cmpxchg has memory ordering hints. We give this acquire semantics. NOTE: The unlock in libc_r is implemented by a "normal" assign statement. This is not correct on ia64 due to the memory ordering characteristics of the architecture. We need release semantics for an unlock.
* Disconnect the userland get/set/swapcontext() functions fromdeischen2002-11-164-6/+6
| | | | | | | | | libc. I want to keep these in some version for the thread library/ies, but don't know whether to have them repo-copied to libc_r or renamed and kept in libc. Change the name of an alpha macro that was changed with the system call commit.
* Provide more correct default values for sysconf(3) reporting of the AIOalfred2002-11-161-0/+3
| | | | | | | | | | | | | subsystems capabilities: _SC_AIO_LISTIO_MAX returns the default of _POSIX_AIO_LISTIO_MAX _SC_AIO_MAX returns the default _POSIX_AIO_MAX _SC_AIO_PRIO_DELTA_MAX returns the default of 0 Without these adjustments the values returned are -1 even when the aio side of the kernel returns '0' for them which is incorrect. Noticed by: Craig Rodrigues <rodrigc@attbi.com>
* Sort SRCS.marcel2002-11-161-5/+4
|
* utmp.ut_time and lastlog.ll_time are explicitly int32_t rather thanpeter2002-11-151-4/+6
| | | | | | | | | | | | time_t. Deal with the possibility that time_t != int32_t. This boils down to this sort of thing: - time(&ut.ut_time); + ut.ut_time = time(NULL); and similar for ctime(3) etc. I've kept it minimal for the stuff that may need to be portable (or 3rd party code), but used Matt's time32 stuff for cases where that isn't as much of a concern. Approved by: re (jhb)
* Fixed style(9)nyan2002-11-1514-410/+485
|
* When about to do an execve(), don't reset the O_NONBLOCK flag on any filearchie2002-11-151-0/+4
| | | | | | | | | descriptors that have the close-on-exec flag set, as that will have no effect anyway and might screw something else up if the file descriptor happens to be shared with another process. PR: standards/43335 MFC after: 1 week
* Make dynamic PAM modules depend on dynamic PAM library.ru2002-11-141-4/+7
| | | | Requested by: des, markm
* Define `Sudden_Underflow' when compiling for the Alpharobert2002-11-141-0/+3
| | | | | | | | | | | | | | | | | | | | | architecture, mainly to avoid getting a SIGFPE signal sent when calling strtod(3) with certain input. The SIGFPE has been sent because the code was not aware that a Gradual Underflow is handled in software via traps on the Alpha architecture, but is not implemented in our Alpha kernel layer. With `Sudden_Underflow' defined, strtod(3) should not depend on Gradual Underflow and adjust its calculations accordingly, which means that other, more subtle errors than the sending of SIGFPE could be solved by this. Discussed with: bde PR: alpha/12623 PR: alpha/17032 PR: alpha/43567 MFC after: 7 days
* bde points out that the LIBC_MAJOR macro doesn't exist and requestsimp2002-11-141-3/+6
| | | | | | | that we not use it here. In its place I've put a comment about the current state of play. Submitted by: bde
* Reset LogTag to NULL in closelog(3). This fixes mysterious crashesru2002-11-141-0/+1
| | | | | | | | | | | caused by dynamic PAM modules that call openlog(3) and closelog(3), e.g. ports/security/pam_pwdfile. What happened here is that the module first registered its "ident" with openlog(3), then PAM library unloaded module with dlclose(3), and the next call to syslog(3) resulted in SIGSEGV. MFC after: 3 days
* o Fix _longjmp() to return 1 when the return value is given as 0.marcel2002-11-141-52/+25
| | | | | | | | | | | | | o Remove the unwanted smartness in _longjmp() where it compares the current ar.bspstore with the saved ar.bspstore and restores ar.rnat based on it. This either avoids saving ar.rnat in the jmp_buf or is the consequence of not saving ar.rnat. All this complexity breaks libc_r where we use longjmp() to switch to different threads and the current ar.bspstore has no relation to the saved ar.bspstore. Thus: we save ar.rnat in setjmp() and simply restore ar.bspstore and ar.rnat in longjmp(). This code needs a cleanup.
* Argh, change declaration of two-dimensional array so that it actuallydeischen2002-11-132-2/+3
| | | | builds.
* Make this compile with whatever error-checking is enabled in buildworlddeischen2002-11-131-2/+2
| | | | and/or beast.
* At initialization, override the pthread stub routines in libcdeischen2002-11-1319-136/+245
| | | | | | | | | by filling in the jump table. Convert uses of pthread routines within libc_r to use the internal versions (_pthread_foo instead of pthread_foo). Remove a couple of globals from application namespace.
* Use a jump table (a la Solaris) for pthread routines with defaultdeischen2002-11-134-401/+230
| | | | | | | | | | entries in the table being stubs. While I'm here, add macros to auto-generate the stubs. A conforming threads library can override the stub routines by filling in the jump table. Add some entries to namespace.h and sync un-namespace.h to it. Also add a comment to remind folks to update un-namespace.h when changing namespace.h.
* The pam_krb5 module stored a reference to a krb5_ccache structure asnectar2002-11-131-20/+42
| | | | | | | | | | | | | | | | | PAM module state (created in pam_sm_authenticate and referenced later in pam_sm_setcred and pam_sm_acct_mgmt). However, the krb5_ccache structure shares some data members with the krb5_context structure that was used in its creation. Since a new krb5_context is created and destroyed at each PAM entry point, this inevitably caused the krb5_ccache structure to reference free'd memory. Now instead of storing a pointer to the krb5_ccache structure, we store the name of the cache (e.g. `MEMORY:0x123CACHE') in pam_sm_authenticate, and resolve the name in the other entry points. This bug was uncovered by phkmalloc's free'd memory scrubbing. Approved by: re (jhb)
* Use `krb5_get_err_text' instead of `error_message' so that instead ofnectar2002-11-131-24/+47
| | | | | | | | | | | | | | | | | e.g. Unknown error: -1765328378 we get Client not found in Kerberos database Another way to accomplish this would have been to leave `error_message' alone, but to explicitly load the Kerberos com_err error tables. However, I don't really like the idea of a PAM module dorking with global tables. Approved by: re (jhb)
* Actually check if stdbool.h exists when BOOTSTRAPPING.ru2002-11-132-2/+2
|
* Bootstrapping aid for 4.0-RELEASE.ru2002-11-132-0/+8
|
* Handle EFI partitions the same as regular FAT partitions. The onlymarcel2002-11-132-0/+4
| | | | | | difference between the two from a low-level point of view is that the partition type is different. This change adds EFI related cases to existing switch statements with existing FAT related cases.
* Add LOGIN_SETMAC to the list of flags that can't be set without classrwatson2002-11-121-1/+1
| | | | | | | | information, since we rely on the pwd entry to know what MAC labels to set as part of the login process. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Fix bogus return values from libc_r's writev() routine in situations wherearchie2002-11-121-6/+21
| | | | | | | a partial-write is followed by an error. PR: 43335 MFC after: 3 days
* Schedule an idle context to block until timeouts expire without blockingmini2002-11-126-214/+178
| | | | further upcalls.
* - Document the chunk_name() function that replaces chunk_n[].davidc2002-11-111-5/+10
| | | | - Rearrange things a tiny bit.
* Remove parameter names from function prototypes (at least one collideddavidc2002-11-111-36/+37
| | | | | | with stdlib.h). discussed with: phk
* Remove debugging printfs.phk2002-11-111-7/+0
|
* ia64 ABI breaker:marcel2002-11-113-38/+6
| | | | | | | | | | | | | Don't force 16-byte alignment at run-time. Do it at compile-time. This saves us the pointer fiddling by the setjmp functions and reduces complexity. While here, increase the jmp_buf by 16 bytes to an even 512 bytes. Coincidentally, due to the way alignment was handled prior to this change, the jmp_buf has not changed in size, but only in how the space is used. Prior to this change the 16 bytes were reserved for enforcing alignment; now they are reserved by us for future extensions. Therefore, this ABI breaker is relatively save: the failure is always an alignment trap.
* MBR slices are named the same on ia64 as they are on i386.marcel2002-11-111-4/+4
|
* Given that we have 3 places to document UUID related information,marcel2002-11-111-9/+69
| | | | | | | | | | | | | | | namely uuidgen(1), uuidgen(2) and uuid(3), the following division has been choosen: uuidgen(1) A description of the command line utility, and other user oriented UUID information. uuidgen(2) A mostly technical description of UUIDs. uuid(3) A description of the functions and other programmer oriented UUID information. According to the division: add more technical contents. Contributed by: Hiten Pandya <hiten@uk.FreeBSD.org> Edited and enhanced: marcel
* Write the boot block to the first 16 sectors of all partitions, instead ofjake2002-11-101-12/+13
| | | | | | | | | | always to the first 16 sectors of the disk. The firmware reads the boot code from a partition, defaulting to 'a' if none is specified, which only corresponds to the first 16 sectors of the disk if 'a' is first. Solaris often makes the swap partition first, instead of the root partition, and users expect to be able to do the same with freebsd as well. This also allows one to temporarily boot from another partition if the boot block on the root partition gets scrambled somehow.
* Add efi to the list of types for which we need to return tha name.marcel2002-11-101-1/+4
| | | | | Also, return chunk type efi in case we find an EFI partition in the GPT. We used to return FAT due to a lack of EFI type.
* Add an efi chunk type. We need to be able to create an EFI partitionmarcel2002-11-101-0/+1
| | | | | on ia64, because that's where we need to put the loader and the kernel.
* General cleanup:marcel2002-11-101-96/+68
| | | | | | | | | | | | | | | | | | | | | | | o Remove all code guarded by !defined(__ia64__). This file is specifically written for ia64, o Handle the case when read_block() or write_block() fails. We don't want sysinstall(8) to signal a thumbs-up on error, o Set the starting (cyl,hd,sect) triple to 0xFFFFFF when either bios_hd or bios_sect is zero or the LBA us not representable with the triple. In that case automaticly initialize the ending triple with 0xFFFFFF as well, o Reindent Write_Int32() as it was different than the rest of the file, o Remove some unused variables that appeared to be used but were effectively useless. o Plug a memory leak: The second timne we read the MBR, we write out a modified block, but didn't free the memory after writing. o Replace d1->sector_size with 512 when we read/write the MBR. We ignore the sector size in cases we shouldn't but adhered to it in cases it would be wrong if the sector_size wasn't 512. This file should eventually be rewritten to write out a GPT. For now, a MBR will do...
OpenPOWER on IntegriCloud