#
360400 |
|
27-Apr-2020 |
kevans |
MFC r359954: sys/types.h: adjust #endif comment to match reality
|
#
331722 |
|
29-Mar-2018 |
eadler |
Revert r330897:
This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code.
Revert with prejudice.
This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes.
Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes.
Requested by: gjb (re)
|
#
330897 |
|
14-Mar-2018 |
eadler |
Partial merge of the SPDX changes
These changes are incomplete but are making it difficult to determine what other changes can/should be merged.
No objections from: pfg
|
#
313574 |
|
11-Feb-2017 |
kib |
MFC r313194: Define the vm_ooffset_t and vm_pindex_t types as machine-independend.
|
#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
299571 |
|
12-May-2016 |
cem |
Pollute more places with off64_t and add __off64_t
Despite the private namespace, several broken ports depend on the __off64_t name for the type. Export it exactly the same way off_t and __off_t are exported.
A follow-up to r299456.
Suggested by: php56 Sponsored by: EMC / Isilon Storage Division
|
#
294883 |
|
27-Jan-2016 |
jhibbits |
Convert rman to use rman_res_t instead of u_long
Summary: Migrate to using the semi-opaque type rman_res_t to specify rman resources. For now, this is still compatible with u_long.
This is step one in migrating rman to use uintmax_t for resources instead of u_long.
Going forward, this could feasibly be used to specify architecture-specific definitions of resource ranges, rather than baking a specific integer type into the API.
This change has been broken out to facilitate MFC'ing drivers back to 10 without breaking ABI.
Reviewed By: jhb Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5075
|
#
288258 |
|
26-Sep-2015 |
kib |
Make the __bitcount*() functions unconditionally available, by moving them out of the #if _BSD_VISIBLE block. Other headers may depend on __bitcount(). The dependencies can be a header not specified by POSIX, and then namespace restrictions by _XOPEN_SOURCE are not applicable, as it was reported. Or, we might grow an implementation of some POSIX facility using __bitcount(), which also should work.
Reported by: Jason Schulz <schulz.j@gmail.com> Discussed with: jhb Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
|
#
280279 |
|
20-Mar-2015 |
jhb |
Expand the bitcount* API to support 64-bit integers, plain ints and longs and create a "hidden" API that can be used in other system headers without adding namespace pollution. - If the POPCNT instruction is enabled at compile time, use __builtin_popcount*() to implement __bitcount*(), otherwise fall back to software implementations. - Use the existing bitcount16() and bitcount32() from <sys/systm.h> to implement the non-POPCNT __bitcount16() and __bitcount32() in <sys/types.h>. - For the non-POPCNT __bitcount64(), use a similar SWAR method on 64-bit systems. For 32-bit systems, use two __bitcount32() operations on the two halves. - Use __bitcount32() to provide a __bitcount() that operates on plain ints. - Use either __bitcount32() or __bitcount64() to provide a __bitcountl() that operates on longs. - Add public bitcount*() wrappers for __bitcount*() for use in the kernel in <sys/libkern.h>. - Use __builtinl() instead of __builtin_popcountl() in BIT_COUNT().
Discussed with: bde
|
#
280148 |
|
16-Mar-2015 |
rwatson |
Introduce a cap_ioctl_t used for the 'cmds' arguments to cap_ioctls_limit() and cap_ioctls_get(). On FreeBSD, these are 'unsigned long', but on Linux, ioctl(2) takes an 'int', making mild abstraction desirable.
MFC after: 3 days Sponsored by: Google, Inc.
|
#
255219 |
|
04-Sep-2013 |
pjd |
Change the cap_rights_t type from uint64_t to a structure that we can extend in the future in a backward compatible (API and ABI) way.
The cap_rights_t represents capability rights. We used to use one bit to represent one right, but we are running out of spare bits. Currently the new structure provides place for 114 rights (so 50 more than the previous cap_rights_t), but it is possible to grow the structure to hold at least 285 rights, although we can make it even larger if 285 rights won't be enough.
The structure definition looks like this:
struct cap_rights { uint64_t cr_rights[CAP_RIGHTS_VERSION + 2]; };
The initial CAP_RIGHTS_VERSION is 0.
The top two bits in the first element of the cr_rights[] array contain total number of elements in the array - 2. This means if those two bits are equal to 0, we have 2 array elements.
The top two bits in all remaining array elements should be 0. The next five bits in all array elements contain array index. Only one bit is used and bit position in this five-bits range defines array index. This means there can be at most five array elements in the future.
To define new right the CAPRIGHT() macro must be used. The macro takes two arguments - an array index and a bit to set, eg.
#define CAP_PDKILL CAPRIGHT(1, 0x0000000000000800ULL)
We still support aliases that combine few rights, but the rights have to belong to the same array element, eg:
#define CAP_LOOKUP CAPRIGHT(0, 0x0000000000000400ULL) #define CAP_FCHMOD CAPRIGHT(0, 0x0000000000002000ULL)
#define CAP_FCHMODAT (CAP_FCHMOD | CAP_LOOKUP)
There is new API to manage the new cap_rights_t structure:
cap_rights_t *cap_rights_init(cap_rights_t *rights, ...); void cap_rights_set(cap_rights_t *rights, ...); void cap_rights_clear(cap_rights_t *rights, ...); bool cap_rights_is_set(const cap_rights_t *rights, ...);
bool cap_rights_is_valid(const cap_rights_t *rights); void cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src); void cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src); bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little);
Capability rights to the cap_rights_init(), cap_rights_set(), cap_rights_clear() and cap_rights_is_set() functions are provided by separating them with commas, eg:
cap_rights_t rights;
cap_rights_init(&rights, CAP_READ, CAP_WRITE, CAP_FSTAT);
There is no need to terminate the list of rights, as those functions are actually macros that take care of the termination, eg:
#define cap_rights_set(rights, ...) \ __cap_rights_set((rights), __VA_ARGS__, 0ULL) void __cap_rights_set(cap_rights_t *rights, ...);
Thanks to using one bit as an array index we can assert in those functions that there are no two rights belonging to different array elements provided together. For example this is illegal and will be detected, because CAP_LOOKUP belongs to element 0 and CAP_PDKILL to element 1:
cap_rights_init(&rights, CAP_LOOKUP | CAP_PDKILL);
Providing several rights that belongs to the same array's element this way is correct, but is not advised. It should only be used for aliases definition.
This commit also breaks compatibility with some existing Capsicum system calls, but I see no other way to do that. This should be fine as Capsicum is still experimental and this change is not going to 9.x.
Sponsored by: The FreeBSD Foundation
|
#
247476 |
|
28-Feb-2013 |
davide |
Move the definition of sbintime_t type from <sys/time.h> to <sys/types.h>. With this change we prevent gross namespace pollution.
Reported by: bde Suggested by: attilio
|
#
243135 |
|
16-Nov-2012 |
kib |
Move the definition of the idtype_t from sys/types.h to sys/wait.h. Fix the bug, use #if __BSD_VISIBLE instead of #if defined(__BSD_VISIBLE), since __BSD_VISIBLE is always defined. Reformat the comments from the Solaris style to KNF.
Reported and reviewed by: bde MFC after: 28 days
|
#
242958 |
|
13-Nov-2012 |
kib |
Add the wait6(2) system call. It takes POSIX waitid()-like process designator to select a process which is waited for. The system call optionally returns siginfo_t which would be otherwise provided to SIGCHLD handler, as well as extended structure accounting for child and cumulative grandchild resource usage.
Allow to get the current rusage information for non-exited processes as well, similar to Solaris.
The explicit WEXITED flag is required to wait for exited processes, allowing for more fine-grained control of the events the waiter is interested in.
Fix the handling of siginfo for WNOWAIT option for all wait*(2) family, by not removing the queued signal state.
PR: standards/170346 Submitted by: "Jukka A. Ukkonen" <jau@iki.fi> MFC after: 1 month
|
#
230808 |
|
31-Jan-2012 |
pluknet |
Isolate v_caddr_t in the ie driver.
Submitted by: Bruce Evans on net@
|
#
228468 |
|
13-Dec-2011 |
ed |
Replace __const by const in all non-contributed source code.
As C1X is close to being released, there is no need to wrap around a feature that is already part of C90. Most of these files already use `const' in different placed as well.
|
#
228444 |
|
12-Dec-2011 |
mdf |
- Define true and false in sys/types.h for _KERNEL consumers, and typedef bool. Due to macro expansion it seemed better to use a typedef for kernel consumers (specifically ofed won't compile without more changes if a define is used). - <stdbool.h> should also not re-define bool/true/false if they are defined by <sys/types.h>. It would probably be a programming error to define _KERNEL for user-space code, but downstream consumers like Isilon have already been including <stdbool.h> in kernel sources, and this protects that usage. - sizeof(_Bool) is not necessarily the same as sizeof(int), so kernel modules should be rebuild with this change. Bump __FreeBSD_version.
MFC after: 2 weeks Sponsored by: Isilon Systems, LLC
|
#
223710 |
|
01-Jul-2011 |
jonathan |
Define cap_rights_t and DTYPE_CAPABILITY, which are required to implement Capsicum capabilities.
Approved by: mentor (rwatson), re (bz)
|
#
222813 |
|
07-Jun-2011 |
attilio |
etire the cpumask_t type and replace it with cpuset_t usage.
This is intended to fix the bug where cpu mask objects are capped to 32. MAXCPU, then, can now arbitrarely bumped to whatever value. Anyway, as long as several structures in the kernel are statically allocated and sized as MAXCPU, it is suggested to keep it as low as possible for the time being.
Technical notes on this commit itself: - More functions to handle with cpuset_t objects are introduced. The most notable are cpusetobj_ffs() (which calculates a ffs(3) for a cpuset_t object), cpusetobj_strprint() (which prepares a string representing a cpuset_t object) and cpusetobj_strscan() (which creates a valid cpuset_t starting from a string representation). - pc_cpumask and pc_other_cpus are target to be removed soon. With the moving from cpumask_t to cpuset_t they are now inefficient and not really useful. Anyway, for the time being, please note that access to pcpu datas is protected by sched_pin() in order to avoid migrating the CPU while reading more than one (possible) word - Please note that size of cpuset_t objects may differ between kernel and userland. While this is not directly related to the patch itself, it is good to understand that concept and possibly use the patch as a reference on how to deal with cpuset_t objects in userland, when accessing kernland members. - KTR_CPUMASK is changed and now is represented through a string, to be set as the example reported in NOTES.
Please additively note that no MAXCPU is bumped in this patch, but private testing has been done until to MAXCPU=128 on a real 8x8x2(htt) machine (amd64).
Please note that the FreeBSD version is not yet bumped because of the upcoming pcpu changes. However, note that this patch is not targeted for MFC.
People to thank for the time spent on this patch: - sbruno, pluknet and Nicholas Esborn (nick AT desert DOT net) tested several revision of the patches and really helped in improving stability of this work. - marius fixed several bugs in the sparc64 implementation and reviewed patches related to ktr. - jeff and jhb discussed the basic approach followed. - kib and marcel made targeted review on some specific part of the patch. - marius, art, nwhitehorn and andreast reviewed MD specific part of the patch. - marius, andreast, gonzo, nwhitehorn and jceel tested MD specific implementations of the patch. - Other people have made contributions on other patches that have been already committed and have been listed separately.
Companies that should be mentioned for having participated at several degrees: - Yahoo! for having offered the machines used for testing on big count of CPUs. - The FreeBSD Foundation for having sponsored my devsummit attendance, which has been instrumental. - Sandvine for having offered offices and infrastructure during development.
(I really hope I didn't forget anyone, if it happened I apologize in advance).
|
#
221502 |
|
05-May-2011 |
obrien |
Don't duplicate define the stdint types.
|
#
210365 |
|
22-Jul-2010 |
trasz |
Remove spurious '/*-' marks and fix some other style problems.
Submitted by: bde@
|
#
210226 |
|
18-Jul-2010 |
trasz |
Revert r210225 - turns out I was wrong; the "/*-" is not license-only thing; it's also used to indicate that the comment should not be automatically rewrapped.
Explained by: cperciva@
|
#
210225 |
|
18-Jul-2010 |
trasz |
The "/*-" comment marker is supposed to denote copyrights. Remove non-copyright occurences from sys/sys/ and sys/kern/.
|
#
196615 |
|
28-Aug-2009 |
jhb |
Extend the device pager to support different memory attributes on different pages in an object. - Add a new variant of d_mmap() currently called d_mmap2() which accepts an additional in/out parameter that is the memory attribute to use for the requested page. - A driver either uses d_mmap() or d_mmap2() for all requests but not both. The current implementation uses a flag in the cdevsw (D_MMAP2) to indicate that the driver provides a d_mmap2() handler instead of d_mmap(). This is done to make the change ABI compatible with existing drivers and MFC'able to 7 and 8.
Submitted by: alc MFC after: 1 month
|
#
187830 |
|
28-Jan-2009 |
ed |
Last step of splitting up minor and unit numbers: remove minor().
Inside the kernel, the minor() function was responsible for obtaining the device minor number of a character device. Because we made device numbers dynamically allocated and independent of the unit number passed to make_dev() a long time ago, it was actually a misnomer. If you really want to obtain the device number, you should use dev2udev().
We already converted all the drivers to use dev2unit() to obtain the device unit number, which is still used by a lot of drivers. I've noticed not a single driver passes NULL to dev2unit(). Even if they would, its behaviour would make little sense. This is why I've removed the NULL check.
Ths commit removes minor(), minor2unit() and unit2minor() from the kernel. Because there was a naming collision with uminor(), we can rename umajor() and uminor() back to major() and minor(). This means that the makedev(3) manual page also applies to kernel space code now.
I suspect umajor() and uminor() isn't used that often in external code, but to make it easier for other parties to port their code, I've increased __FreeBSD_version to 800062.
|
#
184413 |
|
28-Oct-2008 |
trasz |
Introduce accmode_t. This is required for NFSv4 ACLs - it will be neccessary to add more V* constants, and the variables changed by this patch were often being assigned to mode_t variables, which is 16 bit.
Approved by: rwatson (mentor)
|
#
183406 |
|
27-Sep-2008 |
ed |
Move uminor() and umajor() to the same place as userspace minor() and major().
The uminor() and umajor() functions have the same use in kernel space as the minor() and major() functions in userspace. If we ever get rid of the minor() function in kernel space, we could decide to just expose minor() and major() to kernel space, making uminor() and umajor() redundant.
There are two reasons why we want to have uminor() and umajor() in <sys/types.h>:
- Having them close together prevents them from diverting. Even though it's unlikely the definitions will change, it's a good habit to have them at the same place.
- They don't really belong in kern_conf.c. kern_conf.c has been liberated from dealing with device major and minor number handling.
The device_ids(9) manpage now lists the wrong #include's, because it should only list <sys/types.h> now. I'm leaving it as it is now, because I wonder if we should document them anyway. We're probably better off documenting minor(3) and major(3).
|
#
181875 |
|
19-Aug-2008 |
jhb |
Export 'struct pcpu' to userland w/o requiring _KERNEL. A few ports already define _KERNEL to get to this and I'm about to add hooks to libkvm to access per-CPU data.
MFC after: 1 week
|
#
176730 |
|
02-Mar-2008 |
jeff |
Add cpuset, an api for thread to cpu binding and cpu resource grouping and assignment. - Add a reference to a struct cpuset in each thread that is inherited from the thread that created it. - Release the reference when the thread is destroyed. - Add prototypes for syscalls and macros for manipulating cpusets in sys/cpuset.h - Add syscalls to create, get, and set new numbered cpusets: cpuset(), cpuset_{get,set}id() - Add syscalls for getting and setting affinity masks for cpusets or individual threads: cpuid_{get,set}affinity() - Add types for the 'level' and 'which' parameters for the cpuset. This will permit expansion of the api to cover cpu masks for other objects identifiable with an id_t integer. For example, IRQs and Jails may be coming soon. - The root set 0 contains all valid cpus. All thread initially belong to cpuset 1. This permits migrating all threads off of certain cpus to reserve them for special applications.
Sponsored by: Nokia Discussed with: arch, rwatson, brooks, davidxu, deischen Reviewed by: antoine
|
#
174043 |
|
28-Nov-2007 |
jb |
Remove _SOLARIS_C_SOURCE compatibility definitions. Unfortunately the ZFS porting style didn't extend this, instead using a heap of additional header files that don't get installed.
My intention had been to allow OpenSolaris external code to build on FreeBSD out of the box (i.e. without a src tree).
|
#
160986 |
|
04-Aug-2006 |
jb |
Add some compatibility definitions for OpenSolaris source.
These are only defined if _SOLARIS_C_SOURCE is defined, so they don't polute the FreeBSD compile environment.
They are used all over the OpenSolaris source, so defining them here removes the need to continually resolve differences in FreeBSD system haeder files from Solaris header files.
|
#
152825 |
|
26-Nov-2005 |
davidxu |
Bring in experimental kernel support for POSIX message queue.
|
#
150559 |
|
26-Sep-2005 |
njl |
Fix order and style(9) to match surrounding defs.
|
#
150521 |
|
24-Sep-2005 |
phk |
Add two convenience functions for device drivers: bus_alloc_resources() and bus_free_resources(). These functions take a list of resources and handle them all in one go. A flag makes it possible to mark a resource as optional.
A typical device driver can save 10-30 lines of code by using these.
Usage examples will follow RSN.
MFC: A good idea, eventually.
|
#
146824 |
|
31-May-2005 |
rodrigc |
According to: http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/types.h.html
#include <sys/types.h> should include the definitions of pthread types.
PR: standards/78907 Reported by: Brooks Davis Approved by: das (mentor)
|
#
143952 |
|
21-Mar-2005 |
das |
- Declare mknod in stat.h (in addition to unistd.h), as per XSI. - Use blksize_t and blkcnt_t in struct stat. - Hide non-standard fields in stat.h when !__BSD_VISIBLE. - Add restrict qualifiers in stat.h.
|
#
130735 |
|
19-Jun-2004 |
marcel |
Define __lwpid_t as an int32_t in <sys/_types.h> and define lwpid_t as an __lwpid_t in <sys/types.h>. Retype td_tid from an int to a lwpid_t and change related definitions accordingly.
|
#
130640 |
|
17-Jun-2004 |
phk |
Second half of the dev_t cleanup.
The big lines are: NODEV -> NULL NOUDEV -> NODEV udev_t -> dev_t udev2dev() -> findcdev()
Various minor adjustments including handling of userland access to kernel space struct cdev etc.
|
#
130585 |
|
16-Jun-2004 |
phk |
Do the dreaded s/dev_t/struct cdev */ Bump __FreeBSD_version accordingly.
|
#
130434 |
|
13-Jun-2004 |
das |
Add __fixpt_t to _types.h, and typedef __fixpt_t fixpt_t in types.h.
|
#
128448 |
|
19-Apr-2004 |
obrien |
Prevent SysV spellings in int's in the kernel.
Submitted by: bde
|
#
127976 |
|
07-Apr-2004 |
imp |
Remove advertising clause from University of California Regent's license, per letter dated July 22, 1999.
Approved by: core
|
#
127239 |
|
20-Mar-2004 |
marcel |
Introduce the cpumask_t type. The purpose of the type is to create a level of abstraction for any and all CPU mask and CPU bitmap variables so that platforms have the ability to break free from the hard limit of 32 CPUs, simply because we don't have more bits in an u_int. Note that the type is not supposed to solve massive parallelism, where the number of CPUs can be larger than the width of the widest integral type. As such, cpumask_t is not supposed to be a compound type. If such would be necessary in the future, we can deal with the issues then and there. For now, it can be assumed that the type is integral and unsigned.
With this commit, all MD definitions start off as u_int. This allows us to phase-in cpumask_t at our leasure without breaking anything. Once cpumask_t is used consistently, platforms can switch to wider (or smaller) types if such would be beneficial (or not; whatever :-)
Compile-tested on: i386
|
#
112745 |
|
28-Mar-2003 |
mike |
Move details of dev_t (and udev_t) to <sys/_types.h>.
|
#
112569 |
|
24-Mar-2003 |
jake |
- Add vm_paddr_t, a physical address type. This is required for systems where physical addresses larger than virtual addresses, such as i386s with PAE. - Use this to represent physical addresses in the MI vm system and in the i386 pmap code. This also changes the paddr parameter to d_mmap_t. - Fix printf formats to handle physical addresses >4G in the i386 memory detection code, and due to kvtop returning vm_paddr_t instead of u_long.
Note that this is a name change only; vm_paddr_t is still the same as vm_offset_t on all currently supported platforms.
Sponsored by: DARPA, Network Associates Laboratories Discussed with: re, phk (cdevsw change)
|
#
111705 |
|
01-Mar-2003 |
mike |
Share ino_t and nlink_t.
|
#
110051 |
|
29-Jan-2003 |
mike |
Style: keep most typedefs in the same place.
|
#
108190 |
|
22-Dec-2002 |
mike |
Add suseconds_t and useconds_t for storing microseconds.
|
#
105683 |
|
22-Oct-2002 |
tjr |
Add back the typedefs for in_addr_t and in_port_t; some broken autoconf scripts expect <sys/types.h> to define them.
|
#
105650 |
|
21-Oct-2002 |
mike |
Add id_t, a new type capable of representing a pid_t or a uid_t. Move the definition of rlim_t to <sys/_types.h> so that it can be shared.
|
#
105142 |
|
14-Oct-2002 |
mike |
Move details of key_t to <sys/_types.h>, so that it can be typedef'd in more than just <sys/types.h>.
|
#
104422 |
|
03-Oct-2002 |
peter |
Move swblk_t from sys/types.h to sys/dmap.h, the only include that uses it. It's also only used in vm/vm_swap.c, but that is also the only source file that #include's <sys/dmap.h>. sys/dmap.h could probably be embedded entirely in vm_swap.c since that is the only consumer of it.
|
#
104341 |
|
02-Oct-2002 |
mike |
o Update a visibility conditional. o Adjust some comments in keeping with the header's local style. o Change some typedefs to use types that don't require namespace pollution or deprecated types. o Move some macros to the "does not belong in this header" section.
|
#
104043 |
|
27-Sep-2002 |
phk |
Rename struct specinfo to the more appropriate struct cdev.
Agreed on: jake, rwatson, jhb
|
#
104010 |
|
26-Sep-2002 |
mike |
Remove NBBY and howmany() macros.
|
#
103867 |
|
23-Sep-2002 |
mike |
o Move select() helper macros from <sys/types.h> to <sys/select.h>. o Include <sys/select.h> from <sys/types.h> in the __BSD_VISIBLE case, so applications and base software can be slowly updated. o Prototype select() in <sys/select.h>. It was previously only prototyped in <unistd.h>. o Add some XXX's to <sys/types.h>.
Reviewed by: -standards
|
#
103457 |
|
17-Sep-2002 |
mike |
pid_t will be shared with at least <fcntl.h>.
|
#
102421 |
|
25-Aug-2002 |
mike |
Move intrmask_t to the kernel-only section of <sys/types.h>. Add some comments submitted by bde.
|
#
102325 |
|
23-Aug-2002 |
mike |
o Fix namespace issues in <sys/mman.h>. o Move mode_t details from <sys/types.h> into <sys/_types.h>. o Add primitives for sharing the mode_t and off_t typedefs. o Add typedefs mode_t, off_t, and size_t to <sys/mman.h>.
PR: 21644
|
#
102227 |
|
21-Aug-2002 |
mike |
o Merge <machine/ansi.h> and <machine/types.h> into a new header called <machine/_types.h>. o <machine/ansi.h> will continue to live so it can define MD clock macros, which are only MD because of gratuitous differences between architectures. o Change all headers to make use of this. This mainly involves changing: #ifdef _BSD_FOO_T_ typedef _BSD_FOO_T_ foo_t; #undef _BSD_FOO_T_ #endif to: #ifndef _FOO_T_DECLARED typedef __foo_t foo_t; #define _FOO_T_DECLARED #endif
Concept by: bde Reviewed by: jake, obrien
|
#
98542 |
|
21-Jun-2002 |
mckusick |
This commit adds basic support for the UFS2 filesystem. The UFS2 filesystem expands the inode to 256 bytes to make space for 64-bit block pointers. It also adds a file-creation time field, an ability to use jumbo blocks per inode to allow extent like pointer density, and space for extended attributes (up to twice the filesystem block size worth of attributes, e.g., on a 16K filesystem, there is space for 32K of attributes). UFS2 fully supports and runs existing UFS1 filesystems. New filesystems built using newfs can be built in either UFS1 or UFS2 format using the -O option. In this commit UFS1 is the default format, so if you want to build UFS2 format filesystems, you must specify -O 2. This default will be changed to UFS2 when UFS2 proves itself to be stable. In this commit the boot code for reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c) as there is insufficient space in the boot block. Once the size of the boot block is increased, this code can be defined.
Things to note: the definition of SBSIZE has changed to SBLOCKSIZE. The header file <ufs/ufs/dinode.h> must be included before <ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and ufs_lbn_t.
Still TODO: Verify that the first level bootstraps work for all the architectures. Convert the utility ffsinfo to understand UFS2 and test growfs. Add support for the extended attribute storage. Update soft updates to ensure integrity of extended attribute storage. Switch the current extended attribute interfaces to use the extended attribute storage. Add the extent like functionality (framework is there, but is currently never used).
Sponsored by: DARPA & NAI Labs. Reviewed by: Poul-Henning Kamp <phk@freebsd.org>
|
#
98271 |
|
15-Jun-2002 |
wollman |
Fix visibility macros. Declare fsblkcnt_t and fsfilcnt_t (for statvfs()) per POSIX.
|
#
96851 |
|
18-May-2002 |
phk |
Try again: Make daddr_t 64 bits.
Sponsored by: DARPA & NAI Labs.
|
#
96849 |
|
18-May-2002 |
phk |
Move the hideously misnamed type "u_daddr_t" to <sys/blist.h> where it belongs.
Sponsored by: DARPA & NAI Labs.
|
#
96679 |
|
15-May-2002 |
phk |
Revert daddr_t to 32 bits while we research the reported problems.
|
#
96572 |
|
14-May-2002 |
phk |
Make daddr_t and u_daddr_t 64bits wide. Retire daddr64_t and use daddr_t instead.
Sponsored by: DARPA & NAI Labs.
|
#
94363 |
|
10-Apr-2002 |
mike |
Remove the hack for segsz_t from <sys/types.h>; use the normal _BSD_FOO_T_ method for defining segsz_t.
|
#
93947 |
|
06-Apr-2002 |
jake |
segsz_t needs to be 64bit for sparc64.
|
#
93521 |
|
01-Apr-2002 |
mike |
Fix some whitespace style bugs.
|
#
93514 |
|
01-Apr-2002 |
mike |
o Implement <sys/_types.h>, a new header for storing types that are MI, not required to be a fixed size, and used in multiple headers. This will grow in time, as more things move here from <sys/types.h> and <machine/ansi.h>. o Add missing type definitions (uint16_t and uint32_t) to <arpa/inet.h> and <netinet/in.h>. o Reduce pollution in <sys/types.h> by using `#if _FOO_T_DECLARED' widgets to avoid including <sys/stdint.h>. o Add some missing type definitions to <unistd.h> and note the ones that still need to be added. o Make use of <sys/_types.h> primitives in <grp.h> and <sys/types.h>.
Reviewed by: bde
|
#
92719 |
|
19-Mar-2002 |
alfred |
Remove __P
|
#
92363 |
|
15-Mar-2002 |
mckusick |
Introduce the new 64-bit size disk block, daddr64_t. Change the bio and buffer structures to have daddr64_t bio_pblkno, b_blkno, and b_lblkno fields which allows access to disks larger than a Terabyte in size. This change also requires that the VOP_BMAP vnode operation accept and return daddr64_t blocks. This delta should not affect system operation in any way. It merely sets up the necessary interfaces to allow the development of disk drivers that work with these larger disk block addresses. It also allows for the development of UFS2 which will use 64-bit block addresses.
|
#
91325 |
|
26-Feb-2002 |
mike |
Rather than include namespace pollution in <grp.h> in order to declare `gid_t', use the canonical protection scheme to define a type in two or more headers. This brings <grp.h> closer to POSIX.1-2001 conformance.
|
#
90868 |
|
18-Feb-2002 |
mike |
o Move NTOHL() and associated macros into <sys/param.h>. These are deprecated in favor of the POSIX-defined lowercase variants. o Change all occurrences of NTOHL() and associated marcros in the source tree to use the lowercase function variants. o Add missing license bits to sparc64's <machine/endian.h>. Approved by: jake o Clean up <machine/endian.h> files. o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>. o Remove prototypes for non-existent bswapXX() functions. o Include <machine/endian.h> in <arpa/inet.h> to define the POSIX-required ntohl() family of functions. o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>, and <sys/param.h>. o Prepend underscores to the ntohl() family to help deal with complexities associated with having MD (asm and inline) versions, and having to prevent exposure of these functions in other headers that happen to make use of endian-specific defines. o Create weak aliases to the canonical function name to help deal with third-party software forgetting to include an appropriate header. o Remove some now unneeded pollution from <sys/types.h>. o Add missing <arpa/inet.h> includes in userland.
Tested on: alpha, i386 Reviewed by: bde, jake, tmm
|
#
90711 |
|
15-Feb-2002 |
wollman |
Resurrect one of the easiest changes from my big include files roll-up patch from a year ago: give file flags their own type. This does not (yet) change the type used by system calls or library functions. The underlying type was chosen to match what is returned by stat().
|
#
90193 |
|
04-Feb-2002 |
markm |
Back out the "upgrading" of NBBY to unsigned, as it exposes bugs elsewhere, and also is well understood as a signed quantity.
|
#
90135 |
|
03-Feb-2002 |
markm |
Zero functional difference; make some integer constants unsigned, as they are used in unsigned context. This shuts lint(1) up in a few significant ways with "signed/unsigned" arithmetic warnings.
|
#
87158 |
|
01-Dec-2001 |
mike |
o Stop abusing MD headers with non-MD types. o Hide nonstandard functions and types in <netinet/in.h> when _POSIX_SOURCE is defined. o Add some missing types (required by POSIX.1-200x) to <netinet/in.h>. o Restore vendor ID from Rev 1.1 in <netinet/in.h> and make use of new __FBSDID() macro. o Fix some miscellaneous issues in <arpa/inet.h>. o Correct final argument for the inet_ntop() function (POSIX.1-200x). o Get rid of the namespace pollution from <sys/types.h> in <arpa/inet.h>.
Reviewed by: fenner Partially submitted by: bde
|
#
85892 |
|
02-Nov-2001 |
mike |
o Add new header <sys/stdint.h>. o Make <stdint.h> a symbolic link to <sys/stdint.h>. o Move most of <sys/inttypes.h> into <sys/stdint.h>, as per C99. o Remove <sys/inttypes.h>. o Adjust includes in sys/types.h and boot/efi/include/ia64/efibind.h to reflect new location of integer types in <sys/stdint.h>. o Remove previously symbolicly linked <inttypes.h>, instead create a new file. o Add MD headers <machine/_inttypes.h> from NetBSD. o Include <sys/stdint.h> in <inttypes.h>, as required by C99; and include <machine/_inttypes.h> in <inttypes.h>, to fill in the remaining requirements for <inttypes.h>. o Add additional integer types in <machine/ansi.h> and <machine/limits.h> which are included via <sys/stdint.h>.
Partially obtain from: NetBSD Tested on: alpha, i386 Discussed on: freebsd-standards@bostonradio.org Reviewed by: bde, fenner, obrien, wollman
|
#
82727 |
|
01-Sep-2001 |
dillon |
Undo last commit. The problem's been fixed for a long time.
|
#
82698 |
|
31-Aug-2001 |
dillon |
Add FD_SETSIZE warning to types.h
|
#
82530 |
|
29-Aug-2001 |
mike |
o Remove some GCCisms in src/powerpc/include/endian.h. o Unify <machine/endian.h>'s across all architectures. o Make bswapXX() functions use a different spelling of u_int16_t and friends to reduce namespace pollution. The bswapXX() functions don't actually exist, but we'll probably import these at some point. Atleast one driver (if_de) depends on bswapXX() for big endian cases. o Deprecate byteorder(3) prototypes from <sys/types.h>, these are now prototyped indirectly in <arpa/inet.h>. o Deprecate in_addr_t and in_port_t typedefs in <sys/types.h>, these are now typedef'd in <arpa/inet.h>. o Change byteorder(3) prototypes to use standards compliant uint32_t (spelled __uint32_t to reduce namespace pollution). o Document new preferred headers and standards compliance.
Discussed with: bde PR: 29946 Reviewed by: bmilekic
|
#
79769 |
|
15-Jul-2001 |
peter |
Use a fixed type for times in on-disk structures for ufs rather than something that could potentially change like time_t.
|
#
74746 |
|
24-Mar-2001 |
ume |
Unbreak build on alpha. - Move in_port_t to sys/types.h. - Nuke in_addr_t from each endian.h.
Reported by: jhb
|
#
74700 |
|
23-Mar-2001 |
ume |
IPv4 address is not unsigned int. This change introduces in_addr_t.
PR: 9982 Adviced by: des Reviewed by: -alpha and -net (no objection) Obtained from: OpenBSD
|
#
67708 |
|
27-Oct-2000 |
phk |
Convert all users of fldoff() to offsetof(). fldoff() is bad because it only takes a struct tag which makes it impossible to use unions, typedefs etc.
Define __offsetof() in <machine/ansi.h>
Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h>
Remove myriad of local offsetof() definitions.
Remove includes of <stddef.h> in kernel code.
NB: Kernelcode should *never* include from /usr/include !
Make <sys/queue.h> include <machine/ansi.h> to avoid polluting the API.
Deprecate <struct.h> with a warning. The warning turns into an error on 01-12-2000 and the file gets removed entirely on 01-01-2001.
Paritials reviews by: various. Significant brucifications by: bde
|
#
57361 |
|
20-Feb-2000 |
peter |
Followup to previous commit; change fd_mask from signed to unsigned as it should have been to start with. The implications of that are not pleasant when combined with >> as it breaks on multiples of NFDBITS. Right shifting of a signed value fills with a copy of the sign bit, not a zero.
Reported by: bde
|
#
57357 |
|
20-Feb-2000 |
peter |
Fix select(2) for the Alpha. (!!) It was never returning true for fd's in the range of 32-63, 96-127 etc. The first problem was the FD_*() macros were shifting a 32 bit integer "1" left by more than 32 bits. The same problem happened in selscan(). ffs() also takes an int argument and causes failure. For cases where int == long (ie: the usual case for x86, but not always as gcc can have long being a 64 bit quantity) ffs() could be used.
Reported by: Marian Stagarescu <marian@bile.skycache.com> Reviewed by: dfr, gallatin (sys/types.h only) Approved by: jkh
|
#
55205 |
|
29-Dec-1999 |
peter |
Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
|
#
51901 |
|
03-Oct-1999 |
marcel |
Don't use const and volatile directly. Use the macros. This fixes the breakage for K&R sources.
|
#
50477 |
|
27-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
48936 |
|
20-Jul-1999 |
phk |
Now a dev_t is a pointer to struct specinfo which is shared by all specdev vnodes referencing this device.
Details: cdevsw->d_parms has been removed, the specinfo is available now (== dev_t) and the driver should modify it directly when applicable, and the only driver doing so, does so: vn.c. I am not sure the logic in checking for "<" was right before, and it looks even less so now.
An intial pool of 50 struct specinfo are depleted during early boot, after that malloc had better work. It is likely that fewer than 50 would do.
Hashing is done from udev_t to dev_t with a prime number remainder hash, experiments show no better hash available for decent cost (MD5 is only marginally better) The prime number used should not be close to a power of two, we use 83 for now.
Add new checkalias2() to get around the loss of info from dev2udev() in bdevvp();
The aliased vnodes are hung on a list straight of the dev_t, and speclisth[SPECSZ] is unused. The sharing of struct specinfo means that the v_specnext moves into the vnode which grows by 4 bytes.
Don't use a VBLK dev_t which doesn't make sense in MFS, now we hang a dummy cdevsw on B/Cmaj 253 so that things look sane.
Storage overhead from all of this is O(50k).
Bump __FreeBSD_version to 400009
The next step will add the stuff needed so device-drivers can start to hang things from struct specinfo
|
#
48874 |
|
18-Jul-1999 |
jdp |
Remove a duplicate comment.
|
#
47066 |
|
12-May-1999 |
phk |
Produce compiler warning if dev_t and udev_t is confused.
|
#
47049 |
|
12-May-1999 |
phk |
#define udev_t dev_t in userland, so that programs which peek at vnodes and stuff compile. They may still not work however.
|
#
47028 |
|
11-May-1999 |
phk |
Divorce "dev_t" from the "major|minor" bitmap, which is now called udev_t in the kernel but still called dev_t in userland.
Provide functions to manipulate both types: major() umajor() minor() uminor() makedev() umakedev() dev2udev() udev2dev()
For now they're functions, they will become in-line functions after one of the next two steps in this process.
Return major/minor/makedev to macro-hood for userland.
Register a name in cdevsw[] for the "filedescriptor" driver.
In the kernel the udev_t appears in places where we have the major/minor number combination, (ie: a potential device: we may not have the driver nor the device), like in inodes, vattr, cdevsw registration and so on, whereas the dev_t appears where we carry around a reference to a actual device.
In the future the cdevsw and the aliased-from vnode will be hung directly from the dev_t, along with up to two softc pointers for the device driver and a few houskeeping bits. This will essentially replace the current "alias" check code (same buck, bigger bang).
A little stunt has been provided to try to catch places where the wrong type is being used (dev_t vs udev_t), if you see something not working, #undef DEVT_FASCIST in kern/kern_conf.c and see if it makes a difference. If it does, please try to track it down (many hands make light work) or at least try to reproduce it as simply as possible, and describe how to do that.
Without DEVT_FASCIST I belive this patch is a no-op.
Stylistic/posixoid comments about the userland view of the <sys/*.h> files welcome now, from userland they now contain the end result.
Next planned step: make all dev_t's refer to the same devsw[] which means convert BLK's to CHR's at the perimeter of the vnodes and other places where they enter the game (bootdev, mknod, sysctl).
|
#
46818 |
|
09-May-1999 |
phk |
Make minor, major and makedev inline functions so we gain type checking and prevent compile time creation of dev_t's from happening again.
|
#
43311 |
|
27-Jan-1999 |
dillon |
Fix warnings in preparation for adding -Wall -Wcast-qual to the kernel compile
|
#
43290 |
|
27-Jan-1999 |
dillon |
Added c_caddr_t: const char * version of the char * caddr_t, for use in -Wall / -Wcast-qual fixes.
|
#
42957 |
|
21-Jan-1999 |
dillon |
This is a rather large commit that encompasses the new swapper, changes to the VM system to support the new swapper, VM bug fixes, several VM optimizations, and some additional revamping of the VM code. The specific bug fixes will be documented with additional forced commits. This commit is somewhat rough in regards to code cleanup issues.
Reviewed by: "John S. Dyson" <root@dyson.iquest.net>, "David Greenman" <dg@root.com>
|
#
41927 |
|
18-Dec-1998 |
dt |
Little reorganization: - created internal names for fixed-size integral types, like __int32_t. They will be used to make several headers self-sufficient. - <stdlib.h> don't include <machine/types.h> anymore. - created <sys/inttypes.h>, which can be used as <inttypes.h>. - declaration of uoff_t and ufs_daddr_t moved to <sys/types.h>.
Reviewed by: bde
|
#
36735 |
|
07-Jun-1998 |
dfr |
This commit fixes various 64bit portability problems required for FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change.
The prototype FreeBSD/alpha machdep will follow in a couple of days time.
|
#
33778 |
|
24-Feb-1998 |
bde |
MF22: removed duplicate #include of <sys.cdefs.h> and fixed comments about the main #include of it.
Fixed disordering of _BSD_CLOCKID_T.
Removed forward declarations of "common" structs. The declarations are now made closer to where they are used.
|
#
32327 |
|
07-Jan-1998 |
alex |
Define integer types added by POSIX.1g. We already had int8_t, int16_t, and int32_t -- this adds their unsigned counterparts uint8_t, uint16_t, and uint32_t. Bruce has noted that C9x also defines these types (in a different file), so this may have to be revisited with some ifdefs at a later date.
Reviewed by: bde
|
#
32131 |
|
30-Dec-1997 |
alex |
Convert caddr_t --> void * for sys/mman.h functions.
mlock, mmap, mprotect, msync, munlock, and munmap are defined by POSIX as taking void *. The const modifier has been added to mlock, munlock, and mprotect as the standard dictates.
minherit comes from OpenBSD and has been updated to conform with their recent change to void *.
madvise and mincore are not defined by POSIX, but their arguments have been modified to be consistent with the POSIX-defined functions. mincore takes a const pointer, but madvise does not due to the MADV_FREE case.
Discussed with: bde
|
#
25579 |
|
08-May-1997 |
peter |
Add posix-style clock and timer types (clockid_t and timer_t)
|
#
24896 |
|
13-Apr-1997 |
bde |
#ifdef'ed the declaration of lseek() so that -Wredundant-decls doesn't cause noise.
Duplicated the lseek() redeclaration hack for all functions involving off_t's (ftruncate(), mmap() and truncate()) to help broken programs work.
|
#
24895 |
|
13-Apr-1997 |
bde |
Moved #include of <sys/cdefs.h> earlier so that __signed in <machine/types.h> gets redefined in the non-GNU and non-ANSI cases. Since this hasn't caused problems, there must be no one actually benefitting from the obfuscations supported by <sys/cdefs.h>. `make CC="cc -traditional"' in /usr/src/bin shows the same. Almost everything is broken in essentially the same way - `const' is used in strings before <sys/cdefs.h> is included, so `const' is not #defined away until after it is used.
Fixed some style bugs.
|
#
22975 |
|
22-Feb-1997 |
peter |
Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not ready for it yet.
|
#
22968 |
|
21-Feb-1997 |
ache |
Increase FD_SETSIZE back to 1024, select code fixed now
|
#
22780 |
|
16-Feb-1997 |
ache |
Back ut FD_SETSIZE increasing until related kernel issues will be resolved
|
#
22770 |
|
15-Feb-1997 |
ache |
Bump default FD_SETSIZE from 256 to 1024 as many modern systems do nowdays (like SunOs 5.5.1 f.e.) 256 is too small under real network load
|
#
22121 |
|
30-Jan-1997 |
asami |
Change space to tab.
Pointed out by: bde (this is only one of the four, though)
|
#
21673 |
|
14-Jan-1997 |
jkh |
Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
|
#
21346 |
|
05-Jan-1997 |
davidn |
Move typedef for rlim_t into sys/types.h (as per NetBSD).
|
#
15481 |
|
30-Apr-1996 |
bde |
Removed gratuitous differences from Lite2.
Cleaned up vm typedefs.
|
#
15473 |
|
30-Apr-1996 |
phk |
Don't include <machine/ansi.h> twice.
Reviewed by: phk Submitted by: "Philippe Charnier" <charnier@lirmm.fr>
|
#
14500 |
|
11-Mar-1996 |
hsu |
Merge in Lite2: use fixed-width types. Did not accept changes to types of off_t and pid_t. See <machine/ansi.h> for explanation. Did not accept changes to major and minor macros upon bde's review. These changes are unnecessary. Did not accept type change to fd_mask upon bde's review. This change is unnecessary as long as sizeof(fd_mask) divides FD_SETSIZE. Reviewed by: davidg & bde
|
#
12863 |
|
15-Dec-1995 |
peter |
move typedef for key_t from sys/ipc.h to sys/types.h, as suggested in the comment in ipc.h. This is so that prototypes for the sysv ipc functions can be processed without having to #include <sys/ipc.h> in everything..
|
#
12710 |
|
10-Dec-1995 |
bde |
Moved the declaration of boolean_t from <vm/vm_param.h> to <sys/types.h> (if KERNEL is defined). This allows removing bogus dependencies on vm stuff in several places (e.g., ddb) and stops <vm_param.h> from depending on <vm_param.h>
Added declaration of boolean_t to <vm/vm.h> (if KERNEL is not defined). It never belonged in <vm/vm_param.h>. Unfortunately, it is required for some vm headers that are included by applications.
Deleted declarations of TRUE and FALSE from <vm/vm_param.h>. They are defined in <sys/param.h> if KERNEL is defined and we'll soon find out if any applications depend on them being defined in a vm header.
|
#
12642 |
|
05-Dec-1995 |
bde |
Moved the declaration of vm_object_t from <vm/vm.h> to <sys/types.h> (if KERNEL is defined). This allows removing the #includes of vm stuff in vnode_if.h, which will speed up the compilation of LINT by about 5%.
|
#
9342 |
|
27-Jun-1995 |
bde |
Use the new machine-dependent definitions of _BSD_OFF_T_ and _BSD_PID_T_ to declare off_t and pid_t.
|
#
3093 |
|
25-Sep-1994 |
dg |
Extended minor number to include bits 16-31. It was done this way rather than making it 16bit and extending the major to 16bit because doing that would have caused problems with existing filesystems /dev entries. This change should have no apparant side effects. This change is needed for the DOS partition re-work and other things.
Submitted by: Bruce Evans
|
#
2825 |
|
16-Sep-1994 |
paul |
Moved include of cdefs.h outside of ifndef KERNEL so it always gets included.
|
#
1817 |
|
02-Aug-1994 |
dg |
Added $Id$
|
#
1542 |
|
24-May-1994 |
rgrimes |
This commit was generated by cvs2svn to compensate for changes in r1541, which included commits to RCS files with non-trunk default branches.
|
#
1541 |
|
24-May-1994 |
rgrimes |
BSD 4.4 Lite Kernel Sources
|