summaryrefslogtreecommitdiffstats
path: root/sys/sys/queue.h
Commit message (Collapse)AuthorAgeFilesLines
* Move __offsetof() macro from <machine/ansi.h> to <sys/cdefs.h>. It'smike2002-07-081-1/+1
| | | | | | hardly MD, since all our platforms share the same macro. It's not really compiler dependent either, but this helps in reducing <machine/ansi.h> to only type definitions.
* check in the version if this that compiles, not the one that doesn'tjulian2002-07-021-1/+1
|
* Make some more debugging code go away when debugging is not turned on.julian2002-07-021-1/+4
|
* Oops, that was a heck of a lot more debugging left onthan I intended..julian2002-06-291-2/+3
| | | | | | | | turn it off! I don't know if people think that these debugging macros are worth keeping or not but I'll keep them for a short while, while the danger of queue stuffups in the (rather complicated) run queue code exists.
* Part 1 of KSE-IIIjulian2002-06-291-2/+51
| | | | | | | | | | | | | The ability to schedule multiple threads per process (one one cpu) by making ALL system calls optionally asynchronous. to come: ia64 and power-pc patches, patches for gdb, test program (in tools) Reviewed by: Almost everyone who counts (at various times, peter, jhb, matt, alfred, mini, bernd, and a cast of thousands) NOTE: this is still Beta code, and contains lots of debugging stuff. expect slight instability in signals..
* Parenthesize some macro arguments.tmm2002-04-171-2/+2
| | | | | PR: 20024 Submitted by: Tony Finch <dot@dotat.at>
* Add macros for concatenating tailqs and stailqs.tmm2002-04-171-0/+18
| | | | | PR: 20024 Submitted by: Tony Finch <dot@dotat.at> (TAILQ_CONCAT)
* Remove __Palfred2002-03-191-2/+2
|
* Correct a comment that should have been updated in rev 1.43, whensheldonh2001-12-111-2/+2
| | | | | | | CIRCLEQ was removed. PR: kern/32688 Submitted by: Jordan DeLong <fracture@allusion.net>
* namei.h: move "struct componentname" definition outside "struct nameidata",luigi2001-09-281-2/+3
| | | | | | | | | | | | | | and provide a valid STDC/C++ definition for function NDINIT queue.h libkern.h: put explicit casts from void * in insque, remque and memset (for the records, these changes are necessary to let the files compile with g++, which is used to build a FreeBSD module for "Click" -- see www.pdos.lcs.mit.edu/click/ . Given that they have zero impact on our code, it is worthwhile to have them in. MFC after: 3 days
* CIRCLEQs are a disgrace to everything Knuth taught us in Volume 1 Chapter 2.phk2000-12-291-124/+18
| | | | | | Retire them before anybody starts to use them again. Use TAILQ instead, it provides the same functionality.
* Convert all users of fldoff() to offsetof(). fldoff() is badphk2000-10-271-13/+4
| | | | | | | | | | | | | | | | | | | | | | | 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
* Don't bogusly include <struct.h>phk2000-10-221-3/+13
| | | | | Bogusly define our own versions of strbase() and fldoff() until we have sorted out where they live in the kernel.
* Make check for empty list in STAILQ_LAST() more readable.hsu2000-08-031-1/+1
|
* Restore STAILQ_LAST() semantics to match that of TAILQ_LAST()hsu2000-08-031-2/+7
| | | | | | | and CIRCLEQ_LAST(). Return the last element instead of a pointer to the next field of the last element. Reviewed by: dfr
* Back out the previous change to the queue(3) interface.jake2000-05-261-18/+18
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-231-18/+18
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Major style cleanup; make ordering and internal use of the macros consistent.jake2000-05-211-201/+214
| | | | | | | | Hopefully enforce KNF conformance. Add a missing _HEAD_INITIALIZER. Reviewed by: archie, phk, bde (bde did not like all of it) Approved by: mdodd
* Add TAILQ_FOREACH_REVERSE() macro.archie2000-05-011-1/+7
| | | | Submitted by: Jake Burkholder <jburkhol@home.com>
* Add a new macro CIRCLEQ_FOREACH_REVERSE for traversing through aarchie2000-04-271-0/+5
| | | | circle queue in the reverse direction (from tail to head).
* Fix spelling, slingly -> singly.asmodai2000-03-241-1/+1
| | | | Submitted by: nrahlstr
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-291-2/+2
| | | | | | 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.
* Macro needed for NEWCARD kernel and STAILQ emulation.imp1999-10-301-0/+4
| | | | Pointed out by Richard Wackerbar
* Add SLIST_HEAD_INITIALIZER for static initialisation of SLISTs.n_hibma1999-10-051-0/+3
|
* Add STAILQ_FOREACH.jdp1999-08-301-1/+4
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Backout the previous change. Claimed to break compatibility withn_hibma1999-07-061-1/+1
| | | | | | NetBSD. Requested-By: John Polstra
* Remove bogus argument to LIST_HEAD_INITIALIZERn_hibma1999-07-031-2/+2
|
* Remove feature creep: STAILQ_REMOVE_HEAD_UNTIL added it for conveniencen_hibma1999-04-201-6/+1
| | | | but we can do without it.
* Name change suggested by Justin (QUEUE->UNTIL)n_hibma1999-01-071-2/+2
|
* Copied STAILQ_HEAD_INITIALIZER and LIST_HEAD_INITIALIZER from NetBSD, andn_hibma1999-01-061-2/+14
| | | | | added STAILQ_REMOVE_HEAD_QUEUE to emulate NetBSD's SIMPLEQ_REMOVE_HEAD (that removes not only the first element but a queue of elements).
* When some functions were added to sys/queue.h (1.15, 1.16),phk1998-06-241-5/+5
| | | | | | | | the queue diagram (in comment, showing member functions) update were slipped. PR: 7048 Submitted by: SAWADA Mizuki <miz@qb3.so-net.ne.jp>
* Fix the termination test in CIRCLEQ_FOREACH.gibbs1998-05-121-2/+4
| | | | Prompted by: Julian Assange <proff@iq.org>
* Add the 'do/while hack' to all the queue macrosjulian1998-02-241-57/+59
| | | | | | | to allow them to be more generally used. Submitted by: Kirk McKusick (from some of his trees) (possibly some cleanups to follow)
* Correct the definition of CIRCLEQ_EMPTY. It would give a false positivegibbs1997-11-021-2/+2
| | | | | | if the queue contained only one element. Submitted by: Greg Ansley <gja@ansley.com>
* buf.h:gibbs1997-09-211-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the definition of a buffer queue so that bufqdisksort can properly deal with bordered writes. Add inline functions for accessing buffer queues. This should be considered an opaque data structure by clients. callout.h: New callout implementation. device.h: Add support for CAM interrupts. disk.h: disklabel.h: tqdisksort->bufqdisksort kernel.h: Add new configuration entries for configuration hooks and calling cpu_rootconf and cpu_dumpconf. param.h: Add a priority for sleeping waiting on config hooks. proc.h: Update for new callout implementation. queue.h: Add TAILQ_HEAD_INITIALIZER from NetBSD. systm.h: Add prototypes for cpu_root/dumpconf, splcam, splsoftcam, etc..
* Add SLIST_FOREACHphk1997-08-251-2/+5
|
* Add accessors for STAILQ.dfr1997-05-071-1/+6
| | | | Reviewed by: phk
* Add some more "member functions" to these. Still not complete.phk1997-04-271-1/+41
|
* Add LIST_FIRST, LIST_FOREACH and LIST_NEXTphk1997-04-141-1/+8
|
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | 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.
* Addphk1996-12-291-1/+7
| | | | | | | | SLIST_EMPTY(head) SLIST_FIRST(head) SLIST_NEXT(elm, field) Which do the obvious things while hiding implementation details.
* This set of commits to the VM system does the following, and containdyson1996-05-181-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | contributions or ideas from Stephen McKay <syssgm@devetir.qld.gov.au>, Alan Cox <alc@cs.rice.edu>, David Greenman <davidg@freebsd.org> and me: More usage of the TAILQ macros. Additional minor fix to queue.h. Performance enhancements to the pageout daemon. Addition of a wait in the case that the pageout daemon has to run immediately. Slightly modify the pageout algorithm. Significant revamp of the pmap/fork code: 1) PTE's and UPAGES's are NO LONGER in the process's map. 2) PTE's and UPAGES's reside in their own objects. 3) TOTAL elimination of recursive page table pagefaults. 4) The page directory now resides in the PTE object. 5) Implemented pmap_copy, thereby speeding up fork time. 6) Changed the pv entries so that the head is a pointer and not an entire entry. 7) Significant cleanup of pmap_protect, and pmap_remove. 8) Removed significant amounts of machine dependent fork code from vm_glue. Pushed much of that code into the machine dependent pmap module. 9) Support more completely the reuse of already zeroed pages (Page table pages and page directories) as being already zeroed. Performance and code cleanups in vm_map: 1) Improved and simplified allocation of map entries. 2) Improved vm_map_copy code. 3) Corrected some minor problems in the simplify code. Implemented splvm (combo of splbio and splimp.) The VM code now seldom uses splhigh. Improved the speed of and simplified kmem_malloc. Minor mod to vm_fault to avoid using pre-zeroed pages in the case of objects with backing objects along with the already existant condition of having a vnode. (If there is a backing object, there will likely be a COW... With a COW, it isn't necessary to start with a pre-zeroed page.) Minor reorg of source to perhaps improve locality of ref.
* Add five macros to TAILQ family to improve readability.phk1996-04-081-1/+9
|
* Implement the SLIST and the STAILQ macros. This gives a program all thegibbs1996-03-311-3/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | aesthetics of using the 4.4 queue macros without paying undo space or time in scenartios where a singly-linked list works fine. From queue.h: /* * A singly-linked list is headed by a single forward pointer. The elements * are singly linked for minimum space and pointer manipulation overhead at * the expense of O(n) removal for arbitrary elements. New elements can be * added to the list after an existing element or at the head of the list. * Elements being removed from the head of the list should use the explicit * macro for this purpose for optimum efficiency. A singly-linked list may * only be traversed in the forward direction. Singly-linked lists are ideal * for applications with large datasets and few or no removals or for * implementing a LIFO queue. * * A singly-linked tail queue is headed by a pair of pointers, one to the * head of the list and the other to the tail of the list. The elements are * singly linked for minimum space and pointer manipulation overhead at the * expense of O(n) removal for arbitrary elements. New elements can be added * to the list after an existing element, at the head of the list, or at the * end of the list. Elements being removed from the head of the tail queue * should use the explicit macro for this purpose for optimum efficiency. * A singly-linked tail queue may only be traversed in the forward direction. * Singly-linked tail queues are ideal for applications with large datasets * and few or no removals or for implementing a FIFO queue. */
* Merge in Lite2: fix commenthsu1996-03-111-9/+9
| | | | | optimize TAILQ_INSERT_HEAD Reviewed by: davidg & bde
* 4.4Lite2 implemented the LIST_INSERT_BEFORE and TAILQ_INSERT_BEFOREgibbs1996-02-121-2/+2
| | | | | | | exactly as I did (should have checked there first I guess) except my macro for TAILQ_INSERT_BEFORE took an unneeded arg. We now match 4.4Lite2. Suggested by: Jeffrey Hsu <hsu@FreeBSD.org>
* Add LIST_INSERT_BEFORE and TAILQ_INSERT_BEFORE. These are used by thegibbs1996-01-291-1/+15
| | | | new eisaconf code.
* Moved inline functions for insque() and remque() to <sys/queue.h>.bde1995-12-031-3/+48
| | | | | | | Protected them with `#ifdef KERNEL' so that <sys/queue.h> is valid C++. Added the necessary #includes of <sys/queue.h>. These functions are bogus and should be replaced by the queue macros.
OpenPOWER on IntegriCloud