Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

memhandler.h

Go to the documentation of this file.
00001 
00002 /*
00003 ** Copyright (C) 2004 Russell Leighton
00004 **
00005 ** This program is free software; you can redistribute it and/or modify
00006 ** it under the terms of the GNU General Public License as published by
00007 ** the Free Software Foundation; either version 2 of the License, or
00008 ** (at your option) any later version.
00009 **
00010 ** This program is distributed in the hope that it will be useful,
00011 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 ** GNU General Public License for more details.
00014 **
00015 ** You should have received a copy of the GNU General Public License
00016 ** along with this program; if not, write to the Free Software
00017 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00018 */
00019 
00020 
00021 
00022 
00023 #ifndef __AWHANDLER_MEMHANDLER__
00024 #define __AWHANDLER_MEMHANDLER__
00025 
00026 #include "monitor.h"
00027 
00028 #include "wire.h"
00029 
00087 /*
00088 
00089 Changes:
00090 
00091 02/09/04 Russell Leighton
00092 Port to handler
00093 
00094 */
00095 
00099 typedef struct {
00100 
00101   aw_event_sig_t
00102    totalused,
00103    totalfree,
00104    percentused, 
00105    percentswapused;
00106 
00107 } aw_memhandler_events_t;
00108 
00109 
00113 typedef struct {
00114 
00115   aw_handler_t 
00116    handler_header;
00117 
00118   aw_memhandler_events_t
00119    events;
00120 
00121 } aw_memhandler_t ;
00122 
00132 aw_memhandler_t *aw_create_memhandler(aw_memhandler_events_t *events,
00133                                       int32_t (*regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
00134                                       int32_t (*regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
00135                                       aw_alarm_sched_t *sched,
00136                                       aw_logger_t *logger
00137                                   );
00138 
00143 void aw_free_memhandler(aw_memhandler_t *p);
00144 
00148 aw_handler_t *aw_wire_memhandler(aw_wire_mkhandler_args_t *args);
00149 
00150 #endif
00151 
00152 
00153 
00154 
00155 
00156 
00157 
Aware 0.11.1 Copyright (C) 1998-2005 Russell Leighton (russ@elegant-software.com)