--- libaitrpc/src/srv.c 2015/07/02 17:52:53 1.26.2.11 +++ libaitrpc/src/srv.c 2015/07/02 21:52:29 1.26.2.12 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: srv.c,v 1.26.2.11 2015/07/02 17:52:53 misho Exp $ +* $Id: srv.c,v 1.26.2.12 2015/07/02 21:52:29 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -82,6 +82,28 @@ static sched_task_func_t cbProto[SOCK_MAX_SUPPORT][4] static volatile uintptr_t _glSigArg = 0; +#pragma GCC visibility push(hidden) + +static int +rpc_funcs_cmp(struct tagRPCFunc *a, struct tagRPCFunc *b) +{ + int ret; + + assert(a && b); + + ret = AIT_KEY(&a->func_name) - AIT_KEY(&b->func_name); + + if (ret < 0) + return -1; + else if (ret > 0) + return 1; + + return ret; +} + +AVL_GENERATE(tagRPCFuncs, tagRPCFunc, func_node, rpc_funcs_cmp); + +#pragma GCC visibility pop void rpc_freeCli(rpc_cli_t * __restrict c)