⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 realtime.h

📁 在LINUX下实现HA的源代码
💻 H
字号:
/* $Id: realtime.h,v 1.5.2.1 2004/04/20 07:57:54 alan Exp $ */#ifndef _CLPLUMBING_REALTIME_H#	define _CLPLUMBING_REALTIME_H#	include <sched.h>/* * * make_realtime() will make the current process a soft realtime process * and lock it into memory after growing the heap by heapgrowK*1024 bytes * * If you set spolicy or priority to <= 0, then defaults will be used. * Otherwise you need to use a value for spolicy from <sched.h> * and use an appropriate priority for the given spolicy. * * WARNING: badly behaved programs which use the make_realtime() function * can easily hang the machine. */void cl_make_realtime(	int spolicy,	/* SCHED_RR or SCHED_FIFO */	int priority,	/* typically 1-99 */	int stackgrowK,	/* Amount to grow stack by */	int heapgrowK	/* Amount to grow heap by */);void cl_make_normaltime(void);/* Cause calls to make_realtime() to be ignored */void cl_disable_realtime(void);/* Cause calls to make_realtime() to be accepted. * This is the default behaviour */void cl_enable_realtime(void);/* Sleep a really short (the shortest) time */int cl_shortsleep(void);/* Print messages if we've done (more) non-realtime mallocs */void cl_realtime_malloc_check(void);/* Number of times we "go to the well" for memory after becoming realtime */int cl_nonrealtime_malloc_count(void);#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -