dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / hal / hald / solaris / hotplug.h
blob95479c83a754bf15e81bd407a96dcc6bda5c522e
1 /***************************************************************************
3 * hotplug.h : definitions for HAL-internal hotplug events
5 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
6 * Use is subject to license terms.
8 * Licensed under the Academic Free License version 2.1
10 **************************************************************************/
12 #pragma ident "%Z%%M% %I% %E% SMI"
14 #ifndef HOTPLUG_H
15 #define HOTPLUG_H
17 #include <glib.h>
19 #include "../device.h"
20 #include "../util.h"
22 #include "devinfo.h"
24 typedef enum {
25 HOTPLUG_ACTION_ADD,
26 HOTPLUG_ACTION_REMOVE,
27 } HotplugActionType;
29 typedef enum {
30 HOTPLUG_EVENT_DEVFS = 0,
31 } HotplugEventType;
33 /** Data structure representing a hotplug event; also used for
34 * coldplugging.
36 typedef struct
38 HotplugActionType action; /**< Whether the event is add or remove */
39 HotplugEventType type; /**< Type of hotplug event */
41 HalDevice *d;
43 union {
44 struct {
45 char devfs_path[HAL_PATH_MAX];
46 DevinfoDevHandler *handler;
47 } devfs;
48 } un;
50 } HotplugEvent;
52 void hotplug_event_enqueue (HotplugEvent *event, int front);
54 void hotplug_event_process_queue (void);
56 void hotplug_event_end (void *end_token);
58 void hotplug_queue_now_empty (void);
60 #endif /* HOTPLUG_H */