1/* 2 * Copyright 2018, Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5#ifndef _FBSD_IFLIB_SYS__TASK_H_ 6#define _FBSD_IFLIB_SYS__TASK_H_ 7 8/* include the real sys/_task.h */ 9#include_next <sys/_task.h> 10 11 12#include <sys/queue.h> 13 14 15typedef void gtask_fn_t(void *context); 16 17struct gtask { 18 STAILQ_ENTRY(gtask) ta_link; /* (q) link for queue */ 19 uint16_t ta_flags; /* (q) state flags */ 20 u_short ta_priority; /* (c) Priority */ 21 gtask_fn_t *ta_func; /* (c) task handler */ 22 void *ta_context; /* (c) argument for handler */ 23}; 24 25 26#endif 27