diff options
| author | @syxhe <https://t.me/syxhe> | 2025-04-17 21:56:23 -0500 |
|---|---|---|
| committer | @syxhe <https://t.me/syxhe> | 2025-04-17 21:56:23 -0500 |
| commit | d47f45a5e3e40b48131409071b119b442c78bffc (patch) | |
| tree | 95e95ac5cbf2be1fec5402452d586a3400d90a02 /src/ll-internal.h | |
| parent | 9bd10281119a28323ddd05bd13827bceb553cc56 (diff) | |
Create ll-internal files to maintain opaqueness of linked list while opening it up for reuse
Diffstat (limited to 'src/ll-internal.h')
| -rw-r--r-- | src/ll-internal.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/ll-internal.h b/src/ll-internal.h new file mode 100644 index 0000000..f627807 --- /dev/null +++ b/src/ll-internal.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | #ifndef __VXGG_REWRITE___LL_INTERNAL_H___21242172227746___ | ||
| 2 | #define __VXGG_REWRITE___LL_INTERNAL_H___21242172227746___ | ||
| 3 | |||
| 4 | #define __VXGG_REWRITE___LL_INTERNAL___ | ||
| 5 | #include "ll.h" | ||
| 6 | |||
| 7 | typedef struct dll { | ||
| 8 | void *data; | ||
| 9 | dll_freecb freecb; | ||
| 10 | |||
| 11 | struct dll *next; | ||
| 12 | struct dll *prev; | ||
| 13 | |||
| 14 | } dllnode; | ||
| 15 | typedef struct dlinked { | ||
| 16 | int size; | ||
| 17 | dllnode *start; | ||
| 18 | dllnode *end; | ||
| 19 | |||
| 20 | } dlinkedlist; | ||
| 21 | |||
| 22 | dllnode * dllnode_init(void *data, dll_freecb fcb); | ||
| 23 | |||
| 24 | // Note: This file exists because I want to reuse dlinkedlist's definitions from threadpool to create a concurrent queue without | ||
| 25 | // sacrificing the opaqueness of the definition | ||
| 26 | |||
| 27 | #endif \ No newline at end of file | ||
