File: libsys.h

package info (click to toggle)
cpufreqd 1.2.3-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,648 kB
  • ctags: 210
  • sloc: sh: 8,665; ansic: 1,648; makefile: 120
file content (56 lines) | stat: -rw-r--r-- 1,776 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
 *  Copyright (C) 2002,2003,2004  Mattia Dongili<dongili@supereva.it>
 *                                George Staikos <staikos@0wned.org>
 *
 *  2003.16.08
 *  - added support for cpu monitoring, base code by Dietz Proepper and minor
 *    fixes by Mattia Dongili
 *
 *  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
 */
#include "cpufreqd.h"

void (*cp_log) (const int prio, const char *fmt, ...); /* function pointer to the main log function */
general *configuration;

int get_cpu(void);

/*
 * If you want to contribute writing a new PowerManagement plugin
 * just implement those 3 functions
 */

/*
 * Initialization function, preload static informations
 * and performs some checks to let the main program know 
 * if succesful or not.
 *
 * return 0 on success, -1 otherwise
 */
int libsys_init(void);

/*
 * Finalize function, free used memory here please.
 * This is called exiting and reinitializing
 */
void libsys_fini (void);

/*
 * Provides system necessary informations to select the correct
 * policy.
 *
 * return 0 on success, -1 otherwise
 */
int scan_system_info(sys_info *s);