mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 10:37:29 +00:00
libs: make the task cancellation struct private
No reason for the thread/task cancellation struct to be public: move it out of the header file. Also add a flags field. Signed-off-by: Mark Stapp <mjs@voltanet.io>
This commit is contained in:
parent
d887c7bf04
commit
aea25d1ec8
10
lib/thread.c
10
lib/thread.c
@ -45,6 +45,16 @@ DEFINE_MTYPE_STATIC(LIB, THREAD_STATS, "Thread stats")
|
|||||||
|
|
||||||
DECLARE_LIST(thread_list, struct thread, threaditem)
|
DECLARE_LIST(thread_list, struct thread, threaditem)
|
||||||
|
|
||||||
|
struct cancel_req {
|
||||||
|
int flags;
|
||||||
|
struct thread *thread;
|
||||||
|
void *eventobj;
|
||||||
|
struct thread **threadref;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Flags for task cancellation */
|
||||||
|
#define THREAD_CANCEL_FLAG_READY 0x01
|
||||||
|
|
||||||
static int thread_timer_cmp(const struct thread *a, const struct thread *b)
|
static int thread_timer_cmp(const struct thread *a, const struct thread *b)
|
||||||
{
|
{
|
||||||
if (a->u.sands.tv_sec < b->u.sands.tv_sec)
|
if (a->u.sands.tv_sec < b->u.sands.tv_sec)
|
||||||
|
@ -61,12 +61,6 @@ struct fd_handler {
|
|||||||
nfds_t copycount;
|
nfds_t copycount;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct cancel_req {
|
|
||||||
struct thread *thread;
|
|
||||||
void *eventobj;
|
|
||||||
struct thread **threadref;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct xref_threadsched {
|
struct xref_threadsched {
|
||||||
struct xref xref;
|
struct xref xref;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user