亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? dpm.h

?? 一段基于linux的電源管理的源代碼
?? H
字號:
/* * include/linux/dpm.h  DPM policy management * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright (C) 2002, International Business Machines Corporation * All Rights Reserved * * Robert Paulsen * IBM Linux Technology Center * rpaulsen@us.ibm.com * August, 2002 * */#ifndef __DPM_H__#define __DPM_H__#include <linux/config.h>#include <linux/trace.h>#ifndef CONFIG_DPM/* These 2 constants must always be defined for the benefit of the init task   and system tasks, although they are otherwise ignored if DPM is not   configured. The only DPM call that appears in system code is a call to   dpm_set_os() in the context switch. */#define DPM_NO_STATE   -1#define DPM_TASK_STATE 0#define dpm_set_os(task_state) do {} while (0);#else#include <asm/dpm.h>#include <linux/errno.h>#include <linux/types.h>#include <linux/unistd.h>#include <linux/dpm-stats.h>/* User mode defines *//* Machine dependent timing/counts.  If the machine has not defined   DPM_MD_STATS, we use a generic routine based on gettimeofday and 64-bit   values.  Depending on how DPM is being used this may be really slow,   though. *//* * System call functions * * A single system call is used to access all functions. The system call takes * two parameters: a function code and a pointer to a block of parameters. *//* function names for sys_dpm system call interface */typedef enum {	DPM_INIT,		/* initialize the DPM */	DPM_TERMINATE,		/* terminate the DPM */	DPM_DISABLE,		/* temporarily disable the DPM */	DPM_ENABLE,		/* re-enable the disabled DPM */	DPM_CREATE_OPT,		/* create an operating point */	DPM_CREATE_CLASS,	/* create a class of operating points */	DPM_CREATE_POLICY,	/* create a policy */	DPM_DESTROY_POLICY,	/* destroy a policy */	DPM_SET_POLICY,		/* set the active policy */	DPM_GET_POLICY,		/* get the name of the active policy */	DPM_GET_ALL_POLICIES,	/* get the names of all active policies */	DPM_GET_CLASSES,	/* get the names of all active policy */	DPM_SET_TASK_STATE,	/* set a task-specific operating state */	DPM_GET_TASK_STATE,	/* get a task's task-specific oper state */	/* get statistics */	DPM_GET_POLICY_STATS,	DPM_GET_CLASS_STATS,	DPM_GET_OPT_STATS,	DPM_GET_OS_STATS,	/* debug */	DPM_DISPLAY_POLICY} dpm_func_t;/* max size of DPM names */enum {DPM_NAME_SIZE=256};/* parameter block for sys_dpm system call interface */struct dpm_param {	char		*name;		/* name of entity. strlen(name) must					   always be < DPM_NAME_SIZE. String					   must be NULL-terminated. Used by					   many DPM_*. Used to receive name					   with DPM_GET_POLICY. */	char		**m_names;	/* array of member names. Each member					   name has same characteristics as					   above entity name. Used by 					   DPM_CREATE_CLASS and					   DPM_CRETE_POLICY */	unsigned	m_count;	/* length of m_names array when used					   for operating points with					   DPM_CREATE_CLASS. Not used for					   class names with DPM_CREATE_POLICY					   since a policy must always have					   DPM_STATES classes. */	dpm_md_pp_t	*pp;		/* array of machine dependent power					   parameters. Used by DPM_CREATE_OP.					   Length=DPM_PP_NBR */	/* next two used by DPM_SET_TASK_STATE and DPM_GET_TASK_STATE. */	pid_t		pid;		/* task's pid. 0 means "this" task. */	dpm_state_t	task_state;	/* task operating state. Passed in to					   DPM_SET_TASK_STATE. Written to by					   DPM_GET_TASK_STATE. */	/* Used to return values from DPM_GET_*_STATS. Note that it's a	   pointer.  For DPM_GET_OS_STATS the array length must be DPM_STATES,	   otherwise it's a single element. */	struct dpm_stats     *stats;	        /* statistics */};/* single system call to invoke all functions. the "params" argument can be * NULL for DPM_INIT, DPM_TERMINATE, DPM_DISABLE, and DPM_ENABLE */	#if defined(__KERNEL__)extern int sys_dpm(int func, struct dpm_param *params);#else#define sys_dpm(FUNC, PARAMS) \	syscall(__NR_sys_dpm, FUNC, PARAMS)#endif/* Kernel-only defines */#ifdef __KERNEL__#include <linux/dpm-trace.h>#include <linux/list.h>#include <asm/semaphore.h>#include <asm/atomic.h>/***************************************************************************** * Search a list looking for a named entity. * A pointer to the found element is put in the variable named by the * "answer" argument (or it is set to zero if not found). * The structure's type name is given by the "element_type" argument. * The name being looked for is given by the "find_me" argument. * The name of the stand-alone list_head is given by the "list_name" argument. * Assumes the proper semaphore is held. * Assumes the structure's list_head is named "list". * Assumes the structure's name is in a field called "name" *****************************************************************************/#define list_find(answer,find_me,list_name,element_type)        \        do {                                                    \                element_type            *elm;                   \                struct list_head        *scan;                  \                (answer)=0;                                     \                for(scan=list_name.next;scan!=&list_name;       \                                scan=scan->next) {              \                        elm=list_entry(scan,element_type,list); \                        if (strncmp((find_me),elm->name,        \                                        DPM_NAME_SIZE)==0) {    \                                (answer)=elm;                   \                                break;                          \                        }                                       \                }                                               \        } while(0)/* internal representation of an operating point */struct dpm_opt {	char			*name;          /* name */	struct list_head	list;		/* all installed op points */	dpm_md_pp_t             pp[DPM_PP_NBR]; /* initialization params */	struct dpm_md_opt	md_opt;         /* machine dependent part */	int			constrained;	/* is this opt constrained? */	struct dpm_stats        stats;          /* statistics */};/* internal representation of a class of op points (to be mapped to an * operating state */struct dpm_class {	char			*name;          /* name */	struct list_head	list;		/* all installed classes */	unsigned		nops;		/* nbr ops in this class */	struct dpm_opt		**ops;		/* the ops in this class */	struct dpm_opt		*opt;		/* the selected op point */	struct dpm_stats        stats;          /* statistics */};/* internal representation of an installed power policy */struct dpm_policy {	char			*name;          /* name */	struct list_head	list;		/* all installed policies */	struct dpm_class	*classes[DPM_STATES];	/* the classes */	struct dpm_stats        stats;          /* statistics */};/* * internal use utility functions for use by DPM *//* DPM semaphore locking. To simplify future expansion, don't 'down' dpm_sem   directly.  Also, dpm_sem must be 'up'ed only by dpm_unlock(). */extern struct semaphore dpm_sem;extern inline voiddpm_lock(void){        down(&dpm_sem);}extern inline intdpm_lock_interruptible(void){        if (down_interruptible(&dpm_sem))                return -ERESTARTSYS;        return 0;}extern inline intdpm_trylock(void){        if (down_trylock(&dpm_sem))                return -EBUSY;        return 0;}void dpm_unlock(void);void dpm_idle(void);/*  * kernel's operating state interface *//* set operating state */void dpm_set_os(dpm_state_t state);/* * device driver's constraint interface *//* tbd *//* * policy manager's interface */extern char *dpm_state_names[DPM_STATES];/* initialize/terminate the DPM */int dpm_init(void);int dpm_terminate(void);/* (temporarily) disable the DPM */int dpm_disable(void);/* re-enable the DPM */int dpm_enable(void);/* suspend/resume DPM across a system shutdown */int dpm_suspend(void);void dpm_resume(void);/* create operating point */int _dpm_create_opt(struct dpm_opt **opt, const char *name, const dpm_md_pp_t *pp);int dpm_create_opt(const char *name, const dpm_md_pp_t *pp);/* create class of operating points */int dpm_create_class(const char *name, char **op_names, unsigned nops);/* create policy */int dpm_create_policy(const char *name, char **class_names);/* destroy policy */int dpm_destroy_policy(const char *name);/* activate a power policy */int dpm_set_policy(const char *name);/* get name of active power policy */int dpm_get_policy(char *name);/* set a task's task-specific operating state */int dpm_set_task_state(pid_t pid, dpm_state_t state);/* get  a task's task-specific operting state */int dpm_get_task_state(pid_t pid, dpm_state_t *state);/* set a raw operating state */int dpm_set_op_state(const char *name);intdpm_default_set_opt(struct dpm_opt *opt, int flags);/* * global data for power management system *//* curently installed policies, classes and operating points */extern struct list_head		dpm_policies;extern struct list_head		dpm_classes;extern struct list_head		dpm_opts;extern struct semaphore		dpm_policy_sem;extern spinlock_t		dpm_policy_lock;/* the currently active policy */extern struct dpm_policy	*dpm_active_policy;/* the currently active operating state and operating point */extern dpm_state_t		dpm_active_state;extern struct dpm_opt		*dpm_active_opt;/* is DPM initialized and enabled? */extern int			dpm_initialized;extern int			dpm_enabled;/* If this operating point is defined, it will be used as the "relock"   operating point for opt. changes requiring relocking while DPM is   disabled. */extern struct dpm_opt *dpm_relock_opt;struct dpm_idle_parms {	u32 flags;	struct dpm_stats idle_stats;	struct dpm_stats irq_stats;	struct dpm_md_idle_parms md;	};u32 basic_idle(struct dpm_idle_parms *idle_parms);dpm_fscalercompute_fscaler(struct dpm_md_opt *cur, struct dpm_md_opt *new);extern inline voiddpm_quick_enter_state(int new_state){#ifdef CONFIG_DPM_STATS	dpm_update_stats(&dpm_state_stats[new_state],			 &dpm_state_stats[dpm_active_state]);#endif        dpm_active_state = new_state;}/* * The following functions are required to be defined in machine dependent * code: * * machine dependent code to set an operating point  * int dpm_md_set_opt(dpm_opt_t *opt, int flags); * * machine dependent code to initialize an operating point  * int dpm_md_init_opt(dpm_opt_t *opt); * * Machine dependent code to return a timestamp * dpm_md_time_t dpm_md_time(void); *//* Flags for dpm_md_set_opt().  By default, dpm_md_set_op() is guaranteed not   to block the caller, and will arrange to complete asynchronously if   necessary.    DPM_SYNC    The operating point is guaranteed to be set when the call               returns. The call may block.   DPM_UNLOCK  The caller requires dpm_md_set_opt() to unlock the DPM system               once the operating point is set.*/#define DPM_SYNC      0x01#define DPM_UNLOCK    0x02/* * Common machine-dependent and board-dependent function wrappers. */extern struct dpm_md dpm_md;extern struct dpm_bd dpm_bd;static inline voiddpm_md_init(void){        if (dpm_md.init)                dpm_md.init();}static inline voiddpm_md_cleanup(void){        if (dpm_md.cleanup)                dpm_md.cleanup();}static inline voiddpm_md_idle_set_parms(struct dpm_md_idle_parms *idle_parms){        if (dpm_md.idle_set_parms)                dpm_md.idle_set_parms(idle_parms);}/* Machine-dependent operating point creating/query/setting */static inline intdpm_md_init_opt(struct dpm_opt *opt){        if (dpm_md.init_opt)                return dpm_md.init_opt(opt);        return 0;}static inline intdpm_md_set_opt(struct dpm_opt *opt, int flags){        if (dpm_md.set_opt) {		TRACE_DPM(TRACE_EV_DPM_OP, strlen(opt->name) + 1, opt->name);                return dpm_md.set_opt(opt, flags);	}        return 0;}static inline intdpm_md_get_opt(struct dpm_opt *opt){        if (dpm_md.get_opt)                return dpm_md.get_opt(opt);        return 0;}static inline intdpm_bd_init(void){        if (dpm_bd.init)                return dpm_bd.init();        return 0;}static inline intdpm_bd_check_v(unsigned *v){        if (dpm_bd.check_v)                return dpm_bd.check_v(v);        return 0;}static inline unsigneddpm_bd_get_v(void){        if (dpm_bd.get_v)                return dpm_bd.get_v();        return 0;}static inline intdpm_bd_set_v_pre(unsigned cur_mv, unsigned target_mv, int flags){        if (dpm_bd.set_v_pre)                return dpm_bd.set_v_pre(cur_mv, target_mv, flags);        return 0;}static inline intdpm_bd_set_v_post(unsigned cur_mv, unsigned target_mv, int flags){        if (dpm_bd.set_v_post)                return dpm_bd.set_v_post(cur_mv, target_mv, flags);        return 0;}#endif /* __KERNEL__ */#endif /* CONFIG_DPM */#endif /*__DPM_H__*/

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
26uuu国产一区二区三区| 成人av高清在线| 亚洲午夜视频在线| 亚洲精品国产一区二区精华液 | 日韩电影在线观看一区| 一区二区三区在线观看网站| 国产精品毛片久久久久久| 国产女人18毛片水真多成人如厕| 久久久久久久精| 国产欧美日韩久久| 亚洲欧洲制服丝袜| 亚洲综合999| 日韩福利视频导航| 久久99精品国产.久久久久| 国模套图日韩精品一区二区| 国产成人一级电影| 97精品国产97久久久久久久久久久久| 99re这里只有精品首页| 色婷婷精品久久二区二区蜜臂av | 一区二区三区在线观看视频| 亚洲在线一区二区三区| 日本欧美加勒比视频| 国内成人精品2018免费看| 国产91在线|亚洲| 在线看国产日韩| 欧美成人乱码一区二区三区| 国产欧美日韩三级| 亚洲高清一区二区三区| 国产一区二区主播在线| 99精品视频在线观看| 欧美精品久久久久久久多人混战| 2欧美一区二区三区在线观看视频| 欧美国产日韩一二三区| 亚洲图片欧美视频| 国产精品1区二区.| 欧美日韩视频专区在线播放| 精品成人a区在线观看| 亚洲男帅同性gay1069| 老司机午夜精品| 在线免费观看一区| 久久久久久亚洲综合影院红桃 | 欧美性三三影院| 国产香蕉久久精品综合网| 一区二区视频免费在线观看| 精品在线播放午夜| 在线一区二区三区做爰视频网站| 精品国产一区二区三区四区四| 亚洲精品免费播放| 豆国产96在线|亚洲| 日韩午夜三级在线| 亚洲高清久久久| 99国产精品久| 国产亚洲一本大道中文在线| 日本不卡一二三| 在线亚洲免费视频| 中文字幕一区二区不卡 | 久久影院午夜片一区| 亚洲电影你懂得| 69av一区二区三区| 亚洲欧美视频在线观看| 国产福利精品一区二区| 欧美va亚洲va香蕉在线| 亚洲福利国产精品| 欧美性一二三区| 一区二区三区av电影| 99久久99久久精品免费观看 | 97精品电影院| 国产精品五月天| 国产精品亚洲第一| 久久在线免费观看| 国产在线不卡一卡二卡三卡四卡| 欧美一区二区在线视频| 日韩精品电影一区亚洲| 欧美日韩mp4| 日日夜夜免费精品视频| 69av一区二区三区| 日韩1区2区日韩1区2区| 欧美一区二区在线不卡| 久久精品国产精品亚洲综合| 日韩一区二区三区观看| 麻豆91精品视频| 久久久五月婷婷| 成人免费av网站| 亚洲欧美日韩系列| 欧洲一区在线电影| 亚洲成a人v欧美综合天堂下载 | 图片区小说区国产精品视频| 欧美日韩美少妇| 蜜臀av性久久久久蜜臀aⅴ| 欧美一区二区视频在线观看2022 | 色欧美日韩亚洲| 亚洲国产日韩在线一区模特| 欧美乱妇15p| 精品在线一区二区三区| 欧美激情一区二区三区蜜桃视频| 成人动漫视频在线| 亚洲国产中文字幕| 欧美mv日韩mv国产| av亚洲产国偷v产偷v自拍| 亚洲午夜在线观看视频在线| 欧美一区二区成人| 成人黄动漫网站免费app| 一区二区欧美在线观看| 日韩美女在线视频| 97精品视频在线观看自产线路二| 一区二区久久久| 日韩美女一区二区三区四区| 成人深夜视频在线观看| 视频一区二区三区在线| 中文字幕国产一区| 欧美高清视频在线高清观看mv色露露十八 | 午夜国产精品影院在线观看| 2020日本不卡一区二区视频| 一本高清dvd不卡在线观看| 蜜桃免费网站一区二区三区| 1024国产精品| 日韩精品一区二区三区四区| 99久久精品费精品国产一区二区| 青青草国产精品97视觉盛宴 | 欧美亚洲国产一卡| 国产资源在线一区| 亚洲综合一二三区| 国产精品水嫩水嫩| 日韩欧美一卡二卡| 欧美视频一二三区| 成人激情图片网| 激情伊人五月天久久综合| 亚洲午夜免费视频| 中文字幕亚洲电影| 精品精品欲导航| 欧美日韩1区2区| 一本色道综合亚洲| 成人av资源在线观看| 国产真实乱子伦精品视频| 日韩成人伦理电影在线观看| 一区二区三区日韩精品| 国产精品美女www爽爽爽| 久久久天堂av| 精品国产百合女同互慰| 日韩午夜在线观看| 5566中文字幕一区二区电影| 欧美日韩一二三| 欧美日韩国产欧美日美国产精品| 99久久er热在这里只有精品66| 国产成人精品免费| 国产美女精品一区二区三区| 精品一区二区三区在线视频| 日韩成人一级大片| 奇米影视一区二区三区小说| 亚洲成人精品一区| 午夜不卡av在线| 天堂影院一区二区| 日韩精品电影一区亚洲| 欧美a级一区二区| 日本成人在线不卡视频| 秋霞午夜av一区二区三区| 日本怡春院一区二区| 久久成人免费网站| 国产一区二区不卡在线| 欧美日韩久久一区| 欧美一区二区三区四区高清| 欧美一区二区三区在线电影 | 国产无一区二区| 国产精品妹子av| 亚洲免费三区一区二区| 一区二区三区精品在线| 日本不卡在线视频| 久久99在线观看| 福利电影一区二区| 色综合激情五月| 555夜色666亚洲国产免| 久久这里只有精品6| 国产精品电影院| 夜夜精品视频一区二区| 日日噜噜夜夜狠狠视频欧美人 | 久久影视一区二区| 国产婷婷色一区二区三区四区 | 欧美视频在线一区二区三区| 6080国产精品一区二区| 国产女人18毛片水真多成人如厕| 亚洲丝袜制服诱惑| 日韩电影在线观看一区| 国产成人av福利| 欧美日韩卡一卡二| 国产目拍亚洲精品99久久精品| 亚洲欧美激情小说另类| 奇米色777欧美一区二区| 国产精品原创巨作av| 一本色道久久加勒比精品| 欧美一级免费大片| 欧美国产激情二区三区| 成人免费视频一区| 欧美私模裸体表演在线观看| 精品91自产拍在线观看一区| 亚洲精品美国一| 国产在线播精品第三| 99r精品视频| 国产亚洲精品7777| 日本不卡一区二区| 欧美在线免费观看亚洲|