deleted file mode 100644
@@ -1,41 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright (C) 2017 Oracle. All Rights Reserved.
- * Author: Darrick J. Wong <darrick.wong@oracle.com>
- */
-#ifndef _WORKQUEUE_H_
-#define _WORKQUEUE_H_
-
-#include <pthread.h>
-
-struct workqueue;
-
-typedef void workqueue_func_t(struct workqueue *wq, uint32_t index, void *arg);
-
-struct workqueue_item {
- struct workqueue *queue;
- struct workqueue_item *next;
- workqueue_func_t *function;
- void *arg;
- uint32_t index;
-};
-
-struct workqueue {
- void *wq_ctx;
- pthread_t *threads;
- struct workqueue_item *next_item;
- struct workqueue_item *last_item;
- pthread_mutex_t lock;
- pthread_cond_t wakeup;
- unsigned int item_count;
- unsigned int thread_count;
- bool terminate;
-};
-
-int workqueue_create(struct workqueue *wq, void *wq_ctx,
- unsigned int nr_workers);
-int workqueue_add(struct workqueue *wq, workqueue_func_t fn,
- uint32_t index, void *arg);
-void workqueue_destroy(struct workqueue *wq);
-
-#endif /* _WORKQUEUE_H_ */
@@ -37,7 +37,8 @@ crc32table.h \
fsgeom.h \
ptvar.h \
radix-tree.h \
-topology.h
+topology.h \
+workqueue.h
LSRCFILES += gen_crc32table.c
new file mode 100644
@@ -0,0 +1,41 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2017 Oracle. All Rights Reserved.
+ * Author: Darrick J. Wong <darrick.wong@oracle.com>
+ */
+#ifndef __LIBFROG_WORKQUEUE_H__
+#define __LIBFROG_WORKQUEUE_H__
+
+#include <pthread.h>
+
+struct workqueue;
+
+typedef void workqueue_func_t(struct workqueue *wq, uint32_t index, void *arg);
+
+struct workqueue_item {
+ struct workqueue *queue;
+ struct workqueue_item *next;
+ workqueue_func_t *function;
+ void *arg;
+ uint32_t index;
+};
+
+struct workqueue {
+ void *wq_ctx;
+ pthread_t *threads;
+ struct workqueue_item *next_item;
+ struct workqueue_item *last_item;
+ pthread_mutex_t lock;
+ pthread_cond_t wakeup;
+ unsigned int item_count;
+ unsigned int thread_count;
+ bool terminate;
+};
+
+int workqueue_create(struct workqueue *wq, void *wq_ctx,
+ unsigned int nr_workers);
+int workqueue_add(struct workqueue *wq, workqueue_func_t fn,
+ uint32_t index, void *arg);
+void workqueue_destroy(struct workqueue *wq);
+
+#endif /* __LIBFROG_WORKQUEUE_H__ */
@@ -3,7 +3,7 @@
#ifndef _XFS_REPAIR_THREADS_H_
#define _XFS_REPAIR_THREADS_H_
-#include "workqueue.h"
+#include "libfrog/workqueue.h"
void thread_init(void);
@@ -11,7 +11,7 @@
#include "xfs_arch.h"
#include "xfs_format.h"
#include "path.h"
-#include "workqueue.h"
+#include "libfrog/workqueue.h"
#include "xfs_scrub.h"
#include "common.h"
#include "fscounters.h"
@@ -13,7 +13,7 @@
#include "xfs_format.h"
#include "handle.h"
#include "path.h"
-#include "workqueue.h"
+#include "libfrog/workqueue.h"
#include "xfs_scrub.h"
#include "common.h"
#include "inodes.h"
@@ -14,7 +14,7 @@
#include <stdint.h>
#include <pthread.h>
#include "libfrog.h"
-#include "workqueue.h"
+#include "libfrog/workqueue.h"
#include "input.h"
#include "path.h"
#include "handle.h"
@@ -9,7 +9,7 @@
#include <sys/statvfs.h>
#include "list.h"
#include "path.h"
-#include "workqueue.h"
+#include "libfrog/workqueue.h"
#include "xfs_scrub.h"
#include "common.h"
#include "scrub.h"
@@ -9,7 +9,7 @@
#include <sys/statvfs.h>
#include "list.h"
#include "path.h"
-#include "workqueue.h"
+#include "libfrog/workqueue.h"
#include "xfs_scrub.h"
#include "common.h"
#include "counter.h"
@@ -10,7 +10,7 @@
#include <sys/statvfs.h>
#include "list.h"
#include "path.h"
-#include "workqueue.h"
+#include "libfrog/workqueue.h"
#include "xfs_scrub.h"
#include "common.h"
#include "progress.h"
@@ -15,7 +15,7 @@
#include "handle.h"
#include "list.h"
#include "path.h"
-#include "workqueue.h"
+#include "libfrog/workqueue.h"
#include "xfs_scrub.h"
#include "common.h"
#include "inodes.h"
@@ -9,7 +9,7 @@
#include <sys/statvfs.h>
#include "handle.h"
#include "path.h"
-#include "workqueue.h"
+#include "libfrog/workqueue.h"
#include "xfs_scrub.h"
#include "common.h"
#include "libfrog/bitmap.h"
@@ -8,7 +8,7 @@
#include <stdlib.h>
#include <sys/statvfs.h>
#include "libfrog/ptvar.h"
-#include "workqueue.h"
+#include "libfrog/workqueue.h"
#include "path.h"
#include "xfs_scrub.h"
#include "common.h"
@@ -8,7 +8,7 @@
#include <string.h>
#include <pthread.h>
#include <sys/statvfs.h>
-#include "workqueue.h"
+#include "libfrog/workqueue.h"
#include "path.h"
#include "xfs_scrub.h"
#include "common.h"
@@ -10,7 +10,7 @@
#include <sys/statvfs.h>
#include "handle.h"
#include "path.h"
-#include "workqueue.h"
+#include "libfrog/workqueue.h"
#include "xfs_scrub.h"
#include "common.h"
#include "vfs.h"