-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove set arrays and just use a linked list * tweak interface and add teardown * dead code * typo * fix on_close being overwritten to null * each socket has its own linked list of active streams * no inits allowed post teardown * fix bug * can simplify * add guard that cirbuf is inited * slight refactor * more re-entry protection
- Loading branch information
Showing
28 changed files
with
253 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ target_sources( | |
src/endian.c | ||
src/queue.c | ||
src/queue.h | ||
src/link.h | ||
src/io.h | ||
src/udx.c | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef UDX_LINK_H | ||
#define UDX_LINK_H | ||
|
||
#define udx__link_add(l, v) \ | ||
if ((l) == NULL) { \ | ||
(v)->next = (v)->prev = NULL; \ | ||
} else { \ | ||
(v)->prev = NULL; \ | ||
(v)->next = (l); \ | ||
(l)->prev = (v); \ | ||
} \ | ||
(l) = (v); | ||
|
||
#define udx__link_remove(l, v) \ | ||
if ((v)->next != NULL) (v)->next->prev = (v)->prev; \ | ||
if ((v)->prev == NULL) (l) = (v)->next; \ | ||
else (v)->prev->next = (v)->next; | ||
|
||
#define udx__link_foreach(l, el) \ | ||
for ((el) = (l); (el) != NULL; (el) = (el)->next) | ||
|
||
#endif |
Oops, something went wrong.