--- libaitsched/inc/defs.h 2022/10/17 22:45:06 1.17 +++ libaitsched/inc/defs.h 2023/02/23 17:13:01 1.17.10.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: defs.h,v 1.17 2022/10/17 22:45:06 misho Exp $ +* $Id: defs.h,v 1.17.10.1 2023/02/23 17:13:01 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004 - 2022 +Copyright 2004 - 2023 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -212,6 +212,15 @@ transit_task2unuse(sched_task_t * __restrict t, sched_ TASK_UNLOCK(t); TASK_TYPE(t) = taskUNUSE; insert_task_to(t, &(TASK_ROOT(t))->root_unuse); +} + +static inline void +transit_task2ready(sched_task_t * __restrict t, sched_queue_t * __restrict q) +{ + remove_task_from(t, q); + + t->task_type = taskREADY; + insert_task_to(t, &(TASK_ROOT(t))->root_ready); }