Project

General

Profile

Actions

Bug #9731

closed

uts: update sys/queue.h

Added by Toomas Soome almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
2018-08-13
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

The queue.h is implementing family of methods for list and queue management. Our instance has not been updated for a while (compared to FreeBSD and NetBSD) and we are missing manual. Added macros:

+LIST_CLASS_ENTRY
+LIST_CLASS_HEAD
+LIST_END
+LIST_FOREACH_FROM_SAFE
+LIST_FOREACH_FROM
+LIST_FOREACH_SAFE
+LIST_PREV
+LIST_SWAP
+QMD_IS_TRASHED
+QMD_IS_TRASHED
+QMD_SAVELINK
+QMD_SAVELINK
+QMD_TRACE_ELEM
+QMD_TRACE_ELEM
+QMD_TRACE_HEAD
+QMD_TRACE_HEAD
+QUEUE_MACRO_DEBUG_TRACE
+QUEUE_MACRO_DEBUG_TRASH
+QUEUE_TYPEOF
+QUEUE_TYPEOF
+SIMPLEQ_CLASS_ENTRY
+SIMPLEQ_CLASS_HEAD
+SIMPLEQ_CONCAT
+SIMPLEQ_END
+SIMPLEQ_FOREACH_FROM_SAFE
+SIMPLEQ_FOREACH_FROM
+SIMPLEQ_FOREACH_SAFE
+SIMPLEQ_LAST
+SIMPLEQ_REMOVE_AFTER
+SLIST_CLASS_ENTRY
+SLIST_CLASS_HEAD
+SLIST_CONCAT
+SLIST_END
+SLIST_FOREACH_FROM_SAFE
+SLIST_FOREACH_FROM
+SLIST_FOREACH_SAFE
+SLIST_REMOVE_AFTER
+SLIST_SWAP
+STAILQ_CLASS_ENTRY
+STAILQ_CLASS_HEAD
+STAILQ_CONCAT
+STAILQ_END
+STAILQ_FOREACH_FROM_SAFE
+STAILQ_FOREACH_FROM
+STAILQ_FOREACH_SAFE
+STAILQ_LAST
+STAILQ_REMOVE_AFTER
+STAILQ_SWAP
+TAILQ_CLASS_ENTRY
+TAILQ_CLASS_HEAD
+TAILQ_END
+TAILQ_FOREACH_FROM_SAFE
+TAILQ_FOREACH_FROM
+TAILQ_FOREACH_REVERSE_FROM_SAFE
+TAILQ_FOREACH_REVERSE_FROM
+TAILQ_FOREACH_REVERSE_SAFE
+TAILQ_FOREACH_SAFE
+TAILQ_SWAP
+TRACEBUF
+TRACEBUF_INITIALIZER
+TRASHIT

Also updated existing macros to use macros, and did add queue.3 from FreeBSD. This will allow us to drop duplicate instances of queue.h.


Related issues

Related to illumos gate - Feature #9851: add sys/containerof.h and implement __containerofClosedToomas Soome2018-09-19

Actions
Related to illumos gate - Bug #5541: queue(3) man page is neededClosed2015-01-15

Actions
Actions #1

Updated by Electric Monk almost 5 years ago

  • Status changed from New to Closed
  • % Done changed from 90 to 100

git commit 8c5d29ab25ca6e74ebaba57fba6b4794fab41f3c

commit  8c5d29ab25ca6e74ebaba57fba6b4794fab41f3c
Author: Toomas Soome <tsoome@me.com>
Date:   2018-09-04T15:09:39.000Z

    9731 uts: update sys/queue.h
    Reviewed by: Yuri Pankov <yuripv@yuripv.net>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions #2

Updated by Joshua M. Clulow over 4 years ago

  • Related to Feature #9851: add sys/containerof.h and implement __containerof added
Actions #3

Updated by Electric Monk over 4 years ago

git commit b346eedd4542677e9fcb483b961bfeda95289212

commit  b346eedd4542677e9fcb483b961bfeda95289212
Author: Gordon Ross <gwr@nexenta.com>
Date:   2018-09-22T02:46:36.000Z

    backout: 9731 uts: update sys/queue.h (needs work)

    This reverts commit 8c5d29ab25ca6e74ebaba57fba6b4794fab41f3c.

Actions #4

Updated by Gordon Ross over 4 years ago

  • Status changed from Closed to In Progress
Actions #5

Updated by Joshua M. Clulow over 4 years ago

Because Gordon hasn't said anything, I will: this has been backed out because of breakage of the DRM gate build due to namespace pollution. This change will go back in combined with the fix for #9851 (the container_of() namespace pollution that clashed with the DRM gate) once review and approval are finished there.

Actions #6

Updated by Joshua M. Clulow over 4 years ago

Testing Addendum

I have checked out a current copy of oi-userland and followed the instructions to prepare for a build of the openindiana/gfx-drm component there-in. I did this build once on a stock illumos-gate system, to confirm that it would complete successfully. I then applied the latest iteration of #9731 and rebooted, then clobbered and built the component again with the new sys/queue.h header in place. The build succeeded the second time as well. I used wsdiff to compare the gfx-drm proto area of both builds -- there were minor differences of the sort you would expect from changed line numbers in headers, etc, but seemingly nothing major.

Actions #7

Updated by Electric Monk over 4 years ago

  • Status changed from In Progress to Closed

git commit 85280f08e3cfa2e404951ad6817bbb974b576858

commit  85280f08e3cfa2e404951ad6817bbb974b576858
Author: Toomas Soome <tsoome@me.com>
Date:   2018-12-01T07:08:49.000Z

    9731 uts: update sys/queue.h
    Reviewed by: Yuri Pankov <yuripv@yuripv.net>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Joshua M. Clulow <josh@sysmgr.org>

Actions #8

Updated by Gergő Mihály Doma over 4 years ago

  • Related to Bug #5541: queue(3) man page is needed added
Actions

Also available in: Atom PDF