/* libhw/host_sigrt.c - Manage glibc realtime signals * * Copyright (C) 2024 Luke T. Shumaker * SPDX-License-Identifier: AGPL-3.0-or-later */ #include /* for error(3gnu) */ #include /* for SIGRTMIN, SIGRTMAX */ #include "host_sigrt.h" int host_alloc_sigrt(void) { static int next = 0; if (!next) next = SIGRTMIN; int ret = next++; if (ret > SIGRTMAX) error(1, 0, "SIGRTMAX exceeded"); return ret; }