Searched hist:9 (Results 176 - 200 of 7704) sorted by relevance

1234567891011>>

/freebsd-10.0-release/share/examples/kld/syscall/module/
H A Dsyscall.cdiff 193374 Wed Jun 03 07:42:24 MDT 2009 pjd Where if not in examples we should follow style(9)?
diff 134520 Mon Aug 30 07:49:59 MDT 2004 pjd According to module(9), when command is unrecognized, the module should
return EOPNOTSUPP.
/freebsd-10.0-release/share/examples/mdoc/
H A Dexample.9diff 162692 Wed Sep 27 06:39:00 MDT 2006 pjd - Use existing functions mtx_lock() and mtx_unlock().
- Change variable name to 'error', as this is what is mostly used for
functions that return an error.
- Add mutex(9) to the SEE ALSO section.
- Bump the date.

I don't really like the example code. I'd prefer symmetry where possible, eg.

mtx_lock(&example_lock);
error = example(NULL, EXAMPLE_ONE);
mtx_unlock(&example_lock);
if (error != 0)
return (error);

But I'll leave it as it is for now.

Reviewed by: simon
140133 Wed Jan 12 18:49:25 MST 2005 keramida Add a sample manpage for section 9.

Suggested by: simon
Reviewed by: ru
/freebsd-10.0-release/share/man/man9/
H A DSYSCALL_MODULE.9diff 157773 Sat Apr 15 10:04:18 MDT 2006 maxim o Fix prototype for SYSCALL_MODULE(9): the third argument
is a pointer to struct sysent. Correct its description.

PR: docs/84790
Submitted by: Dirk Gouders
MFC after: 2 weeks
76101 Sat Apr 28 11:18:40 MDT 2001 alex Add SYSCALL_MODULE.9, a manpage for the SYSCALL_MODULE wrapper macro
for syscall klds.

Some text of this manpage is based on the comments in the example
syscall module written by Assar Westerlund.

Reviewed by: ru
H A Daltq.9diff 136220 Thu Oct 07 10:10:25 MDT 2004 mlaier Add a minimal altq.4 manpage to tell about the kernel options and where to
find more information. Also move the "SUPPORTED DEVICES" section from altq.9
to altq.4, where is belongs.

Requested by: green
MFC after: 2 days
133265 Sat Aug 07 10:35:56 MDT 2004 mlaier Add altq(9) explaining about the IFQ_* and IFQ_DRV_* macros in if_var.h and
how to convert drivers.

Obtained from: NetBSD (with changes)
Reviewed by: josef
H A Deventtimers.9diff 247463 Thu Feb 28 11:54:36 MST 2013 mav MFcalloutng:
Switch eventtimers(9) from using struct bintime to sbintime_t.
Even before this not a single driver really supported full dynamic range of
struct bintime even in theory, not speaking about practical inexpediency.
This change legitimates the status quo and cleans up the code.
228731 Tue Dec 20 09:55:12 MST 2011 mav Add eventtimers(9) man page, describing related KPIs.

Sponsored by: iXsystems, Inc.
MFC after: 1 month
H A Dmi_switch.9diff 242992 Tue Nov 13 17:33:21 MST 2012 pluknet Avoid an ambiguous reference to mtx_lock(9).

MFC after: 3 days
diff 167387 Fri Mar 09 20:41:01 MST 2007 jhb Allow threads to atomically release rw and sx locks while waiting for an
event. Locking primitives that support this (mtx, rw, and sx) now each
include their own foo_sleep() routine.
- Rename msleep() to _sleep() and change it's 'struct mtx' object to a
'struct lock_object' pointer. _sleep() uses the recently added
lc_unlock() and lc_lock() function pointers for the lock class of the
specified lock to release the lock while the thread is suspended.
- Add wrappers around _sleep() for mutexes (mtx_sleep()), rw locks
(rw_sleep()), and sx locks (sx_sleep()). msleep() still exists and
is now identical to mtx_sleep(), but it is deprecated.
- Rename SLEEPQ_MSLEEP to SLEEPQ_SLEEP.
- Rewrite much of sleep.9 to not be msleep(9) centric.
- Flesh out the 'RETURN VALUES' section in sleep.9 and add an 'ERRORS'
section.
- Add __nonnull(1) to _sleep() and msleep_spin() so that the compiler will
warn if you try to pass a NULL wait channel. The functions already have
a KASSERT to that effect.
diff 167387 Fri Mar 09 20:41:01 MST 2007 jhb Allow threads to atomically release rw and sx locks while waiting for an
event. Locking primitives that support this (mtx, rw, and sx) now each
include their own foo_sleep() routine.
- Rename msleep() to _sleep() and change it's 'struct mtx' object to a
'struct lock_object' pointer. _sleep() uses the recently added
lc_unlock() and lc_lock() function pointers for the lock class of the
specified lock to release the lock while the thread is suspended.
- Add wrappers around _sleep() for mutexes (mtx_sleep()), rw locks
(rw_sleep()), and sx locks (sx_sleep()). msleep() still exists and
is now identical to mtx_sleep(), but it is deprecated.
- Rename SLEEPQ_MSLEEP to SLEEPQ_SLEEP.
- Rewrite much of sleep.9 to not be msleep(9) centric.
- Flesh out the 'RETURN VALUES' section in sleep.9 and add an 'ERRORS'
section.
- Add __nonnull(1) to _sleep() and msleep_spin() so that the compiler will
warn if you try to pass a NULL wait channel. The functions already have
a KASSERT to that effect.
diff 167387 Fri Mar 09 20:41:01 MST 2007 jhb Allow threads to atomically release rw and sx locks while waiting for an
event. Locking primitives that support this (mtx, rw, and sx) now each
include their own foo_sleep() routine.
- Rename msleep() to _sleep() and change it's 'struct mtx' object to a
'struct lock_object' pointer. _sleep() uses the recently added
lc_unlock() and lc_lock() function pointers for the lock class of the
specified lock to release the lock while the thread is suspended.
- Add wrappers around _sleep() for mutexes (mtx_sleep()), rw locks
(rw_sleep()), and sx locks (sx_sleep()). msleep() still exists and
is now identical to mtx_sleep(), but it is deprecated.
- Rename SLEEPQ_MSLEEP to SLEEPQ_SLEEP.
- Rewrite much of sleep.9 to not be msleep(9) centric.
- Flesh out the 'RETURN VALUES' section in sleep.9 and add an 'ERRORS'
section.
- Add __nonnull(1) to _sleep() and msleep_spin() so that the compiler will
warn if you try to pass a NULL wait channel. The functions already have
a KASSERT to that effect.
diff 99576 Mon Jul 08 05:34:46 MDT 2002 julian Slight changes to reflect some of the changes in -current.
mi_switch(9) is still wildly innacurate. I suggest that every kernel
developer takes 20 minutes a day for the next few days and updates one or
two of his favourite chapter 9 man pages as they are now WAY out of date
in general. I will add a couple of KSE related pages soon.
diff 99576 Mon Jul 08 05:34:46 MDT 2002 julian Slight changes to reflect some of the changes in -current.
mi_switch(9) is still wildly innacurate. I suggest that every kernel
developer takes 20 minutes a day for the next few days and updates one or
two of his favourite chapter 9 man pages as they are now WAY out of date
in general. I will add a couple of KSE related pages soon.
24118 Sat Mar 22 18:59:18 MST 1997 mpp Add mi_switch.9. It documents the kernel mi_switch() and cpu_switch()
context switching functions.

Obtained from: NetBSD (renamed from ctxsw.9)
24118 Sat Mar 22 18:59:18 MST 1997 mpp Add mi_switch.9. It documents the kernel mi_switch() and cpu_switch()
context switching functions.

Obtained from: NetBSD (renamed from ctxsw.9)
H A Dp_cansee.9164408 Sun Nov 19 11:35:03 MST 2006 ceri Add manuals for cr_cansee(9) and p_cansee(9).
Thanks to Ruslan for the time he spent reviewing these.

Reviewed by: ru
Approved by: ru
164408 Sun Nov 19 11:35:03 MST 2006 ceri Add manuals for cr_cansee(9) and p_cansee(9).
Thanks to Ruslan for the time he spent reviewing these.

Reviewed by: ru
Approved by: ru
H A Dpfind.9diff 122309 Sat Nov 08 11:41:22 MST 2003 jkoshy Cross-reference pgfind(9) and pfind(9) from each others manual pages.
diff 122309 Sat Nov 08 11:41:22 MST 2003 jkoshy Cross-reference pgfind(9) and pfind(9) from each others manual pages.
H A Dprintf.9diff 140507 Thu Jan 20 08:26:42 MST 2005 glebius log(9) requires sys/syslog.h.

MFC after: 3 days
diff 133428 Tue Aug 10 07:19:08 MDT 2004 joerg Add documentation for log(9).

MFC after: 1 week
H A Dvfs_getnewfsid.987252 Sun Dec 02 22:25:04 MST 2001 alfred More kernel vfs docco.

Xref vfs_mount(9) from vfs_mount(9)

Submitted by: Chad David <davidc@acns.ab.ca>
PR: docs/32431
87252 Sun Dec 02 22:25:04 MST 2001 alfred More kernel vfs docco.

Xref vfs_mount(9) from vfs_mount(9)

Submitted by: Chad David <davidc@acns.ab.ca>
PR: docs/32431
H A Dvfs_getvfs.987252 Sun Dec 02 22:25:04 MST 2001 alfred More kernel vfs docco.

Xref vfs_mount(9) from vfs_mount(9)

Submitted by: Chad David <davidc@acns.ab.ca>
PR: docs/32431
87252 Sun Dec 02 22:25:04 MST 2001 alfred More kernel vfs docco.

Xref vfs_mount(9) from vfs_mount(9)

Submitted by: Chad David <davidc@acns.ab.ca>
PR: docs/32431
H A Dvfs_suser.9diff 183113 Wed Sep 17 13:58:49 MDT 2008 attilio Remove the suser(9) interface from the kernel. It has been replaced from
years by the priv_check(9) interface and just very few places are left.
Note that compatibility stub with older FreeBSD version
(all above the 8 limit though) are left in order to reduce diffs against
old versions. It is responsibility of the maintainers for any module, if
they think it is the case, to axe out such cases.

This patch breaks KPI so __FreeBSD_version will be bumped into a later
commit.

This patch needs to be credited 50-50 with rwatson@ as he found time to
explain me how the priv_check() works in detail and to review patches.

Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
Reviewed by: rwatson
diff 183113 Wed Sep 17 13:58:49 MDT 2008 attilio Remove the suser(9) interface from the kernel. It has been replaced from
years by the priv_check(9) interface and just very few places are left.
Note that compatibility stub with older FreeBSD version
(all above the 8 limit though) are left in order to reduce diffs against
old versions. It is responsibility of the maintainers for any module, if
they think it is the case, to axe out such cases.

This patch breaks KPI so __FreeBSD_version will be bumped into a later
commit.

This patch needs to be credited 50-50 with rwatson@ as he found time to
explain me how the priv_check() works in detail and to review patches.

Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
Reviewed by: rwatson
H A Dvm_map_findspace.9diff 135841 Mon Sep 27 03:44:28 MDT 2004 alc Add cross references to vm_map_entry_resize_free.9.

Submitted by: Mark W. Krentel
120586 Mon Sep 29 22:51:31 MDT 2003 bms Add manual pages for the vm_map(9) part of the VM.

Reviewed by: juli
Approved by: jake (mentor)
H A Dvm_map_insert.9diff 245268 Thu Jan 10 20:47:41 MST 2013 pluknet The Giant lock is no longer used in the vm_map(9) part of the VM.
While here, document that the process lock is acquired in vm_map_stack, too.

MFC after: 1 week
120586 Mon Sep 29 22:51:31 MDT 2003 bms Add manual pages for the vm_map(9) part of the VM.

Reviewed by: juli
Approved by: jake (mentor)
H A Dvm_map_stack.9diff 245268 Thu Jan 10 20:47:41 MST 2013 pluknet The Giant lock is no longer used in the vm_map(9) part of the VM.
While here, document that the process lock is acquired in vm_map_stack, too.

MFC after: 1 week
120586 Mon Sep 29 22:51:31 MDT 2003 bms Add manual pages for the vm_map(9) part of the VM.

Reviewed by: juli
Approved by: jake (mentor)
/freebsd-10.0-release/sys/boot/uboot/lib/
H A Delf_freebsd.cdiff 177152 Thu Mar 13 15:54:21 MDT 2008 obrien style(9) & style.Makefile(9)

Reviewed by: raj
diff 177152 Thu Mar 13 15:54:21 MDT 2008 obrien style(9) & style.Makefile(9)

Reviewed by: raj
/freebsd-10.0-release/sys/cddl/compat/opensolaris/kern/
H A Dopensolaris_cmn_err.cdiff 252392 Sat Jun 29 21:51:06 MDT 2013 smh style(9) fixes

MFC after: 2 days
diff 228710 Mon Dec 19 13:01:12 MST 2011 avg opensolaris compat: fix vcmn_err so that panic(9) produces a proper message

... instead of just a verbatim format string.

Reviewed by: pjd
MFC after: 1 week
/freebsd-10.0-release/sys/dev/mxge/
H A Dmcp_gen_header.h155852 Sun Feb 19 20:39:19 MST 2006 gallatin 10GbE mode driver and binary firmware for Myricom's PCI-express NICs.
More info regarding these nics can be found at http://www.myri.com.

Please note that the files
sys/dev/myri10ge/{mcp_gen_header.h,myri10ge_mcp.h} are internally
shared between all our drivers (solaris, macosx, windows, linux, etc).
I'd like to keep these files unchanged, so I can just import newer
versions of them when the firmware API/ABI changes. This means I'm
stuck with some of the crazy-long #define names, and possibly
non-style(9) characteristics of these files.

Many thanks to mlaier for doing firmware(9) just as I
needed it, and to scottl for his helpful review.

Reviewed by: scottl, glebius
Sponsored by: Myricom Inc.
155852 Sun Feb 19 20:39:19 MST 2006 gallatin 10GbE mode driver and binary firmware for Myricom's PCI-express NICs.
More info regarding these nics can be found at http://www.myri.com.

Please note that the files
sys/dev/myri10ge/{mcp_gen_header.h,myri10ge_mcp.h} are internally
shared between all our drivers (solaris, macosx, windows, linux, etc).
I'd like to keep these files unchanged, so I can just import newer
versions of them when the firmware API/ABI changes. This means I'm
stuck with some of the crazy-long #define names, and possibly
non-style(9) characteristics of these files.

Many thanks to mlaier for doing firmware(9) just as I
needed it, and to scottl for his helpful review.

Reviewed by: scottl, glebius
Sponsored by: Myricom Inc.
/freebsd-10.0-release/sys/dev/quicc/
H A Dquicc_bfe_fdt.cdiff 227843 Tue Nov 22 19:28:28 MST 2011 marius - There's no need to overwrite the default device method with the default
one. Interestingly, these are actually the default for quite some time
(bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9)
since r52045) but even recently added device drivers do this unnecessarily.
Discussed with: jhb, marcel
- While at it, use DEVMETHOD_END.
Discussed with: jhb
- Also while at it, use __FBSDID.
diff 227843 Tue Nov 22 19:28:28 MST 2011 marius - There's no need to overwrite the default device method with the default
one. Interestingly, these are actually the default for quite some time
(bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9)
since r52045) but even recently added device drivers do this unnecessarily.
Discussed with: jhb, marcel
- While at it, use DEVMETHOD_END.
Discussed with: jhb
- Also while at it, use __FBSDID.
/freebsd-10.0-release/sys/dev/sfxge/
H A Dsfxge.cdiff 227843 Tue Nov 22 19:28:28 MST 2011 marius - There's no need to overwrite the default device method with the default
one. Interestingly, these are actually the default for quite some time
(bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9)
since r52045) but even recently added device drivers do this unnecessarily.
Discussed with: jhb, marcel
- While at it, use DEVMETHOD_END.
Discussed with: jhb
- Also while at it, use __FBSDID.
diff 227843 Tue Nov 22 19:28:28 MST 2011 marius - There's no need to overwrite the default device method with the default
one. Interestingly, these are actually the default for quite some time
(bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9)
since r52045) but even recently added device drivers do this unnecessarily.
Discussed with: jhb, marcel
- While at it, use DEVMETHOD_END.
Discussed with: jhb
- Also while at it, use __FBSDID.
/freebsd-10.0-release/sys/dev/siba/
H A Dsiba_pcib.cdiff 227843 Tue Nov 22 19:28:28 MST 2011 marius - There's no need to overwrite the default device method with the default
one. Interestingly, these are actually the default for quite some time
(bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9)
since r52045) but even recently added device drivers do this unnecessarily.
Discussed with: jhb, marcel
- While at it, use DEVMETHOD_END.
Discussed with: jhb
- Also while at it, use __FBSDID.
diff 227843 Tue Nov 22 19:28:28 MST 2011 marius - There's no need to overwrite the default device method with the default
one. Interestingly, these are actually the default for quite some time
(bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9)
since r52045) but even recently added device drivers do this unnecessarily.
Discussed with: jhb, marcel
- While at it, use DEVMETHOD_END.
Discussed with: jhb
- Also while at it, use __FBSDID.
/freebsd-10.0-release/sys/dev/virtio/scsi/
H A Dvirtio_scsivar.hdiff 252702 Thu Jul 04 15:57:52 MDT 2013 bryanv Convert VirtIO to use ithreads instead of taskqueues

Contains projects/virtio commits:

r245709:
Each VirtIO device was scheduling its own taskqueue(9) to do the
off-level interrupt handling. ithreads(9) is the more nature way
to do this. The primary motivation for this work to better support
network multiqueue.
r245710:
virtio: Change virtqueue intr handlers to return void
r245711:
virtio_blk: Remove interrupt taskqueue
r245721:
vtnet: Remove interrupt taskqueue
r245722:
virtio_scsi: Remove interrupt taskqueue
r245747:
vtnet: Remove taskqueue fields missed in r245721

MFC after: 1 month
diff 252702 Thu Jul 04 15:57:52 MDT 2013 bryanv Convert VirtIO to use ithreads instead of taskqueues

Contains projects/virtio commits:

r245709:
Each VirtIO device was scheduling its own taskqueue(9) to do the
off-level interrupt handling. ithreads(9) is the more nature way
to do this. The primary motivation for this work to better support
network multiqueue.
r245710:
virtio: Change virtqueue intr handlers to return void
r245711:
virtio_blk: Remove interrupt taskqueue
r245721:
vtnet: Remove interrupt taskqueue
r245722:
virtio_scsi: Remove interrupt taskqueue
r245747:
vtnet: Remove taskqueue fields missed in r245721

MFC after: 1 month
/freebsd-10.0-release/sys/kern/
H A Dsubr_kobj.cdiff 227537 Tue Nov 15 18:14:41 MST 2011 marius As it turns out, r186347 actually is insufficient to avoid the use of the
curthread-accessing part of mtx_{,un}lock(9) when using a r210623-style
curthread implementation on sparc64, crashing the kernel in its early
cycles as PCPU isn't set up, yet (and can't be set up as OFW is one of the
things we need for that, which leads to a chicken-and-egg problem). What
happens is that due to the fact that the idea of r210623 actually is to
allow the compiler to cache invocations of curthread, it factors out
obtaining curthread needed for both mtx_lock(9) and mtx_unlock(9) to
before the branch based on kobj_mutex_inited when compiling the kernel
without the debugging options. So change kobj_class_compile_static(9)
to just never acquire kobj_mtx, effectively restricting it to its
documented use, and add a kobj_init_static(9) for initializing objects
using a class compiled with the former and that also avoids using mutex(9)
(and malloc(9)). Also assert in both of these functions that they are
used in their intended way only.
While at it, inline kobj_register_method() and kobj_unregister_method()
as there wasn't much point for factoring them out in the first place
and so that a reader of the code has to figure out the locking for
fewer functions missing a KOBJ_ASSERT.
Tested on powerpc{,64} by andreast.

Reviewed by: nwhitehorn (earlier version), jhb
MFC after: 3 days
diff 227537 Tue Nov 15 18:14:41 MST 2011 marius As it turns out, r186347 actually is insufficient to avoid the use of the
curthread-accessing part of mtx_{,un}lock(9) when using a r210623-style
curthread implementation on sparc64, crashing the kernel in its early
cycles as PCPU isn't set up, yet (and can't be set up as OFW is one of the
things we need for that, which leads to a chicken-and-egg problem). What
happens is that due to the fact that the idea of r210623 actually is to
allow the compiler to cache invocations of curthread, it factors out
obtaining curthread needed for both mtx_lock(9) and mtx_unlock(9) to
before the branch based on kobj_mutex_inited when compiling the kernel
without the debugging options. So change kobj_class_compile_static(9)
to just never acquire kobj_mtx, effectively restricting it to its
documented use, and add a kobj_init_static(9) for initializing objects
using a class compiled with the former and that also avoids using mutex(9)
(and malloc(9)). Also assert in both of these functions that they are
used in their intended way only.
While at it, inline kobj_register_method() and kobj_unregister_method()
as there wasn't much point for factoring them out in the first place
and so that a reader of the code has to figure out the locking for
fewer functions missing a KOBJ_ASSERT.
Tested on powerpc{,64} by andreast.

Reviewed by: nwhitehorn (earlier version), jhb
MFC after: 3 days
diff 227537 Tue Nov 15 18:14:41 MST 2011 marius As it turns out, r186347 actually is insufficient to avoid the use of the
curthread-accessing part of mtx_{,un}lock(9) when using a r210623-style
curthread implementation on sparc64, crashing the kernel in its early
cycles as PCPU isn't set up, yet (and can't be set up as OFW is one of the
things we need for that, which leads to a chicken-and-egg problem). What
happens is that due to the fact that the idea of r210623 actually is to
allow the compiler to cache invocations of curthread, it factors out
obtaining curthread needed for both mtx_lock(9) and mtx_unlock(9) to
before the branch based on kobj_mutex_inited when compiling the kernel
without the debugging options. So change kobj_class_compile_static(9)
to just never acquire kobj_mtx, effectively restricting it to its
documented use, and add a kobj_init_static(9) for initializing objects
using a class compiled with the former and that also avoids using mutex(9)
(and malloc(9)). Also assert in both of these functions that they are
used in their intended way only.
While at it, inline kobj_register_method() and kobj_unregister_method()
as there wasn't much point for factoring them out in the first place
and so that a reader of the code has to figure out the locking for
fewer functions missing a KOBJ_ASSERT.
Tested on powerpc{,64} by andreast.

Reviewed by: nwhitehorn (earlier version), jhb
MFC after: 3 days
diff 227537 Tue Nov 15 18:14:41 MST 2011 marius As it turns out, r186347 actually is insufficient to avoid the use of the
curthread-accessing part of mtx_{,un}lock(9) when using a r210623-style
curthread implementation on sparc64, crashing the kernel in its early
cycles as PCPU isn't set up, yet (and can't be set up as OFW is one of the
things we need for that, which leads to a chicken-and-egg problem). What
happens is that due to the fact that the idea of r210623 actually is to
allow the compiler to cache invocations of curthread, it factors out
obtaining curthread needed for both mtx_lock(9) and mtx_unlock(9) to
before the branch based on kobj_mutex_inited when compiling the kernel
without the debugging options. So change kobj_class_compile_static(9)
to just never acquire kobj_mtx, effectively restricting it to its
documented use, and add a kobj_init_static(9) for initializing objects
using a class compiled with the former and that also avoids using mutex(9)
(and malloc(9)). Also assert in both of these functions that they are
used in their intended way only.
While at it, inline kobj_register_method() and kobj_unregister_method()
as there wasn't much point for factoring them out in the first place
and so that a reader of the code has to figure out the locking for
fewer functions missing a KOBJ_ASSERT.
Tested on powerpc{,64} by andreast.

Reviewed by: nwhitehorn (earlier version), jhb
MFC after: 3 days
diff 227537 Tue Nov 15 18:14:41 MST 2011 marius As it turns out, r186347 actually is insufficient to avoid the use of the
curthread-accessing part of mtx_{,un}lock(9) when using a r210623-style
curthread implementation on sparc64, crashing the kernel in its early
cycles as PCPU isn't set up, yet (and can't be set up as OFW is one of the
things we need for that, which leads to a chicken-and-egg problem). What
happens is that due to the fact that the idea of r210623 actually is to
allow the compiler to cache invocations of curthread, it factors out
obtaining curthread needed for both mtx_lock(9) and mtx_unlock(9) to
before the branch based on kobj_mutex_inited when compiling the kernel
without the debugging options. So change kobj_class_compile_static(9)
to just never acquire kobj_mtx, effectively restricting it to its
documented use, and add a kobj_init_static(9) for initializing objects
using a class compiled with the former and that also avoids using mutex(9)
(and malloc(9)). Also assert in both of these functions that they are
used in their intended way only.
While at it, inline kobj_register_method() and kobj_unregister_method()
as there wasn't much point for factoring them out in the first place
and so that a reader of the code has to figure out the locking for
fewer functions missing a KOBJ_ASSERT.
Tested on powerpc{,64} by andreast.

Reviewed by: nwhitehorn (earlier version), jhb
MFC after: 3 days
diff 227537 Tue Nov 15 18:14:41 MST 2011 marius As it turns out, r186347 actually is insufficient to avoid the use of the
curthread-accessing part of mtx_{,un}lock(9) when using a r210623-style
curthread implementation on sparc64, crashing the kernel in its early
cycles as PCPU isn't set up, yet (and can't be set up as OFW is one of the
things we need for that, which leads to a chicken-and-egg problem). What
happens is that due to the fact that the idea of r210623 actually is to
allow the compiler to cache invocations of curthread, it factors out
obtaining curthread needed for both mtx_lock(9) and mtx_unlock(9) to
before the branch based on kobj_mutex_inited when compiling the kernel
without the debugging options. So change kobj_class_compile_static(9)
to just never acquire kobj_mtx, effectively restricting it to its
documented use, and add a kobj_init_static(9) for initializing objects
using a class compiled with the former and that also avoids using mutex(9)
(and malloc(9)). Also assert in both of these functions that they are
used in their intended way only.
While at it, inline kobj_register_method() and kobj_unregister_method()
as there wasn't much point for factoring them out in the first place
and so that a reader of the code has to figure out the locking for
fewer functions missing a KOBJ_ASSERT.
Tested on powerpc{,64} by andreast.

Reviewed by: nwhitehorn (earlier version), jhb
MFC after: 3 days
diff 227537 Tue Nov 15 18:14:41 MST 2011 marius As it turns out, r186347 actually is insufficient to avoid the use of the
curthread-accessing part of mtx_{,un}lock(9) when using a r210623-style
curthread implementation on sparc64, crashing the kernel in its early
cycles as PCPU isn't set up, yet (and can't be set up as OFW is one of the
things we need for that, which leads to a chicken-and-egg problem). What
happens is that due to the fact that the idea of r210623 actually is to
allow the compiler to cache invocations of curthread, it factors out
obtaining curthread needed for both mtx_lock(9) and mtx_unlock(9) to
before the branch based on kobj_mutex_inited when compiling the kernel
without the debugging options. So change kobj_class_compile_static(9)
to just never acquire kobj_mtx, effectively restricting it to its
documented use, and add a kobj_init_static(9) for initializing objects
using a class compiled with the former and that also avoids using mutex(9)
(and malloc(9)). Also assert in both of these functions that they are
used in their intended way only.
While at it, inline kobj_register_method() and kobj_unregister_method()
as there wasn't much point for factoring them out in the first place
and so that a reader of the code has to figure out the locking for
fewer functions missing a KOBJ_ASSERT.
Tested on powerpc{,64} by andreast.

Reviewed by: nwhitehorn (earlier version), jhb
MFC after: 3 days
diff 217326 Wed Jan 12 18:05:45 MST 2011 mdf sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.

Commit the kernel changes.
/freebsd-10.0-release/sys/mips/rt305x/
H A Drt305x_dotg.cdiff 227843 Tue Nov 22 19:28:28 MST 2011 marius - There's no need to overwrite the default device method with the default
one. Interestingly, these are actually the default for quite some time
(bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9)
since r52045) but even recently added device drivers do this unnecessarily.
Discussed with: jhb, marcel
- While at it, use DEVMETHOD_END.
Discussed with: jhb
- Also while at it, use __FBSDID.
diff 227843 Tue Nov 22 19:28:28 MST 2011 marius - There's no need to overwrite the default device method with the default
one. Interestingly, these are actually the default for quite some time
(bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9)
since r52045) but even recently added device drivers do this unnecessarily.
Discussed with: jhb, marcel
- While at it, use DEVMETHOD_END.
Discussed with: jhb
- Also while at it, use __FBSDID.
/freebsd-10.0-release/sys/modules/tmpfs/
H A DMakefilediff 171087 Fri Jun 29 03:23:15 MDT 2007 delphij MFp4:

- Remove unnecessary NULL checks after M_WAITOK allocations.
- Use VOP_ACCESS instead of hand-rolled suser_cred()
calls. [1]
- Use malloc(9) KPI to allocate memory for string. The
optimization taken from NetBSD is not valid for FreeBSD
because our malloc(9) already act that way. [2]

Requested by: rwatson [1]
Submitted by: Howard Su [2]
Approved by: re (tmpfs blanket)
diff 171087 Fri Jun 29 03:23:15 MDT 2007 delphij MFp4:

- Remove unnecessary NULL checks after M_WAITOK allocations.
- Use VOP_ACCESS instead of hand-rolled suser_cred()
calls. [1]
- Use malloc(9) KPI to allocate memory for string. The
optimization taken from NetBSD is not valid for FreeBSD
because our malloc(9) already act that way. [2]

Requested by: rwatson [1]
Submitted by: Howard Su [2]
Approved by: re (tmpfs blanket)

Completed in 352 milliseconds

1234567891011>>