Rename SIMPLEQ_ to STAILQ_ in /usr/src/lib

Index: libc/gen/posix_spawn.c
===================================================================
RCS file: /cvs/src/lib/libc/gen/posix_spawn.c,v
retrieving revision 1.10
diff -u -p -r1.10 posix_spawn.c
--- libc/gen/posix_spawn.c      28 Jun 2019 13:32:41 -0000      1.10
+++ libc/gen/posix_spawn.c      25 Dec 2020 16:17:01 -0000
@@ -46,11 +46,11 @@ struct __posix_spawnattr {
 };
 
 struct __posix_spawn_file_actions {
-       SIMPLEQ_HEAD(, __posix_spawn_file_actions_entry) fa_list;
+       STAILQ_HEAD(, __posix_spawn_file_actions_entry) fa_list;
 };
 
 typedef struct __posix_spawn_file_actions_entry {
-       SIMPLEQ_ENTRY(__posix_spawn_file_actions_entry) fae_list;
+       STAILQ_ENTRY(__posix_spawn_file_actions_entry) fae_list;
        enum { FAE_OPEN, FAE_DUP2, FAE_CLOSE } fae_action;
 
        int fae_fildes;
@@ -182,7 +182,7 @@ process_file_actions(const posix_spawn_f
        int error;
 
        /* Replay all file descriptor modifications */
-       SIMPLEQ_FOREACH(fae, &fa->fa_list, fae_list) {
+       STAILQ_FOREACH(fae, &fa->fa_list, fae_list) {
                error = process_file_actions_entry(fae);
                if (error)
                        return (error);
@@ -258,7 +258,7 @@ posix_spawn_file_actions_init(posix_spaw
        if (fa == NULL)
                return (errno);
 
-       SIMPLEQ_INIT(&fa->fa_list);
+       STAILQ_INIT(&fa->fa_list);
        *ret = fa;
        return (0);
 }
@@ -268,9 +268,9 @@ posix_spawn_file_actions_destroy(posix_s
 {
        posix_spawn_file_actions_entry_t *fae;
 
-       while ((fae = SIMPLEQ_FIRST(&(*fa)->fa_list)) != NULL) {
+       while ((fae = STAILQ_FIRST(&(*fa)->fa_list)) != NULL) {
                /* Remove file action entry from the queue */
-               SIMPLEQ_REMOVE_HEAD(&(*fa)->fa_list, fae_list);
+               STAILQ_REMOVE_HEAD(&(*fa)->fa_list, fae_list);
 
                /* Deallocate file action entry */
                if (fae->fae_action == FAE_OPEN)
@@ -309,7 +309,7 @@ posix_spawn_file_actions_addopen(posix_s
        fae->fae_oflag = oflag;
        fae->fae_mode = mode;
 
-       SIMPLEQ_INSERT_TAIL(&(*fa)->fa_list, fae, fae_list);
+       STAILQ_INSERT_TAIL(&(*fa)->fa_list, fae, fae_list);
        return (0);
 }
 
@@ -332,7 +332,7 @@ posix_spawn_file_actions_adddup2(posix_s
        fae->fae_fildes = fildes;
        fae->fae_newfildes = newfildes;
 
-       SIMPLEQ_INSERT_TAIL(&(*fa)->fa_list, fae, fae_list);
+       STAILQ_INSERT_TAIL(&(*fa)->fa_list, fae, fae_list);
        return (0);
 }
 
@@ -354,7 +354,7 @@ posix_spawn_file_actions_addclose(posix_
        fae->fae_action = FAE_CLOSE;
        fae->fae_fildes = fildes;
 
-       SIMPLEQ_INSERT_TAIL(&(*fa)->fa_list, fae, fae_list);
+       STAILQ_INSERT_TAIL(&(*fa)->fa_list, fae, fae_list);
        return (0);
 }
 
Index: libfuse/fuse_private.h
===================================================================
RCS file: /cvs/src/lib/libfuse/fuse_private.h,v
retrieving revision 1.22
diff -u -p -r1.22 fuse_private.h
--- libfuse/fuse_private.h      16 Nov 2018 02:16:17 -0000      1.22
+++ libfuse/fuse_private.h      25 Dec 2020 16:17:01 -0000
@@ -38,7 +38,7 @@ struct fuse_vnode {
 
        char path[NAME_MAX + 1];
 
-       SIMPLEQ_ENTRY(fuse_vnode) node; /* for dict */
+       STAILQ_ENTRY(fuse_vnode) node; /* for dict */
 };
 
 struct fuse_dirhandle {
@@ -52,7 +52,7 @@ struct fuse_dirhandle {
        off_t off;
 };
 
-SIMPLEQ_HEAD(fuse_vn_head, fuse_vnode);
+STAILQ_HEAD(fuse_vn_head, fuse_vnode);
 SPLAY_HEAD(dict, dictentry);
 SPLAY_HEAD(tree, treeentry);
 
Index: libfuse/fuse_subr.c
===================================================================
RCS file: /cvs/src/lib/libfuse/fuse_subr.c,v
retrieving revision 1.12
diff -u -p -r1.12 fuse_subr.c
--- libfuse/fuse_subr.c 21 May 2018 11:47:46 -0000      1.12
+++ libfuse/fuse_subr.c 25 Dec 2020 16:17:01 -0000
@@ -94,19 +94,19 @@ set_vn(struct fuse *f, struct fuse_vnode
                vn_head = malloc(sizeof(*vn_head));
                if (vn_head == NULL)
                        return (0);
-               SIMPLEQ_INIT(vn_head);
+               STAILQ_INIT(vn_head);
        } else {
                vn_head = dict_get(&f->name_tree, v->path);
                if (vn_head == NULL)
                        return (0);
        }
 
-       SIMPLEQ_FOREACH(vn, vn_head, node) {
+       STAILQ_FOREACH(vn, vn_head, node) {
                if (v->parent == vn->parent && v->ino == vn->ino)
                        return (1);
        }
 
-       SIMPLEQ_INSERT_TAIL(vn_head, v, node);
+       STAILQ_INSERT_TAIL(vn_head, v, node);
        dict_set(&f->name_tree, v->path, vn_head);
 
        return (1);
@@ -124,7 +124,7 @@ remove_vnode_from_name_tree(struct fuse 
                return;
 
        lastv = NULL;
-       SIMPLEQ_FOREACH(v, vn_head, node) {
+       STAILQ_FOREACH(v, vn_head, node) {
                if (v->parent == vn->parent)
                        break;
 
@@ -134,13 +134,13 @@ remove_vnode_from_name_tree(struct fuse 
                return;
 
        /* if we found the vnode remove it */
-       if (v == SIMPLEQ_FIRST(vn_head))
-               SIMPLEQ_REMOVE_HEAD(vn_head, node);
+       if (v == STAILQ_FIRST(vn_head))
+               STAILQ_REMOVE_HEAD(vn_head, node);
        else
-               SIMPLEQ_REMOVE_AFTER(vn_head, lastv, node);
+               STAILQ_REMOVE_AFTER(vn_head, lastv, node);
 
        /* if the queue is empty we need to remove it from the dict */
-       if (SIMPLEQ_EMPTY(vn_head)) {
+       if (STAILQ_EMPTY(vn_head)) {
                vn_head = dict_pop(&f->name_tree, vn->path);
                free(vn_head);
        }
@@ -158,7 +158,7 @@ get_vn_by_name_and_parent(struct fuse *f
        if (vn_head == NULL)
                goto fail;
 
-       SIMPLEQ_FOREACH(v, vn_head, node)
+       STAILQ_FOREACH(v, vn_head, node)
                if (v->parent && v->parent->ino == pino)
                        return (v);
 

Reply via email to