Commit eff24281 authored by Ben Avison's avatar Ben Avison
Browse files

Added some NetBSDisms to help with the USB2 porting work.

Detail:
  * Added macro __KERNEL_RCSID to sys/cdefs.h
  * Added SIMPLEQ macros to sys/queue.h as aliases for FreeBSD's STAILQ
    macros
  * Added STAILQ/SIMPLEQ_FOREACH macro, since it's found inthe latest
    versions of both the FreeBSD and NetBSD sources
Admin:
  Tested against current USB2 sources.

Version 5.47. Tagged as 'TCPIPLibs-5_47'
parent a93c4f6f
/* (5.46)
/* (5.47)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.2.
*
*/
#define Module_MajorVersion_CMHG 5.46
#define Module_MajorVersion_CMHG 5.47
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 02 Dec 2003
#define Module_Date_CMHG 21 Jan 2004
#define Module_MajorVersion "5.46"
#define Module_Version 546
#define Module_MajorVersion "5.47"
#define Module_Version 547
#define Module_MinorVersion ""
#define Module_Date "02 Dec 2003"
#define Module_Date "21 Jan 2004"
#define Module_ApplicationDate "02-Dec-03"
#define Module_ApplicationDate "21-Jan-04"
#define Module_ComponentName "TCPIPLibs"
#define Module_ComponentPath "RiscOS/Sources/Lib/TCPIPLibs"
#define Module_FullVersion "5.46"
#define Module_HelpVersion "5.46 (02 Dec 2003)"
#define Module_LibraryVersionInfo "5:46"
#define Module_FullVersion "5.47"
#define Module_HelpVersion "5.47 (21 Jan 2004)"
#define Module_LibraryVersionInfo "5:47"
......@@ -104,4 +104,6 @@
#define __pure2
#define __attribute__(x)
#define __KERNEL_RCSID(X,Y) static const char* __rcsid=Y
#endif /* !_SYS_CDEFS_H_ */
......@@ -62,6 +62,9 @@
* Singly-linked tail queues are ideal for applications with large datasets
* and few or no removals or for implementing a FIFO queue.
*
* A simple queue is equivalent to a singly-linked tail queue, and is
* provided for compatibility with NetBSD source code.
*
* A list is headed by a single forward pointer (or an array of forward
* pointers for a hash table header). The elements are doubly linked
* so that an arbitrary element can be removed without a need to
......@@ -96,7 +99,7 @@
* _NEXT + + + + +
* _PREV - - - + +
* _LAST - - + + +
* _FOREACH + + - + +
* _FOREACH + + + + +
* _INSERT_HEAD + + + + +
* _INSERT_BEFORE - + - + +
* _INSERT_AFTER + + + + +
......@@ -192,6 +195,11 @@ struct { \
#define STAILQ_FIRST(head) ((head)->stqh_first)
#define STAILQ_LAST(head) (*(head)->stqh_last)
#define STAILQ_FOREACH(var, head, field) \
for((var) = STAILQ_FIRST((head)); \
(var); \
(var) = STAILQ_NEXT((var), field))
#define STAILQ_INSERT_HEAD(head, elm, field) do { \
if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \
(head)->stqh_last = &(elm)->field.stqe_next; \
......@@ -233,6 +241,28 @@ struct { \
} \
} while (0)
/*
* Simple queue definitions.
*/
#define SIMPLEQ_HEAD STAILQ_HEAD
#define SIMPLEQ_HEAD_INITIALIZER STAILQ_HEAD_INITIALIZER
#define SIMPLEQ_ENTRY STAILQ_ENTRY
/*
* Simple queue functions.
*/
#define SIMPLEQ_EMPTY STAILQ_EMPTY
#define SIMPLEQ_INIT STAILQ_INIT
#define SIMPLEQ_FIRST STAILQ_FIRST
#define SIMPLEQ_LAST STAILQ_LAST
#define SIMPLEQ_FOREACH STAILQ_FOREACH
#define SIMPLEQ_INSERT_HEAD STAILQ_INSERT_HEAD
#define SIMPLEQ_INSERT_TAIL STAILQ_INSERT_TAIL
#define SIMPLEQ_INSERT_AFTER STAILQ_INSERT_AFTER
#define SIMPLEQ_NEXT STAILQ_NEXT
#define SIMPLEQ_REMOVE_HEAD STAILQ_REMOVE_HEAD
#define SIMPLEQ_REMOVE STAILQ_REMOVE
/*
* List definitions.
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment