1/* 2 * Process monitor 3 * 4 * Copyright (C) 2014, Broadcom Corporation. All Rights Reserved. 5 * 6 * Permission to use, copy, modify, and/or distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 13 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 15 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 16 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 * 18 * $Id: pmon.h 241182 2011-02-17 21:50:03Z $ 19 */ 20 21#ifndef _pmon_h_ 22#define _pmon_h_ 23 24#define PMON_MAX_ENTRIES 5 25 26typedef int (*pmon_func_t)(void); 27 28 29void pmon_init(void); 30 31bool pmon_register(pid_t pid, pmon_func_t func); 32 33bool pmon_unregister(pid_t pid); 34 35pmon_func_t pmon_get_func(pid_t pid); 36 37pid_t pmon_get_pid(pmon_func_t func); 38 39#endif /* _pmon_h_ */ 40