File: dm-daemon.h

package info (click to toggle)
devmapper 2%3A1.01.00-4sarge1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,044 kB
  • ctags: 2,336
  • sloc: ansic: 11,777; sh: 2,695; makefile: 291; perl: 16
file content (29 lines) | stat: -rw-r--r-- 588 bytes parent folder | download | duplicates (2)
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
/*
 * Copyright (C) 2003 Sistina Software
 *
 * This file is released under the LGPL.
 */

#ifndef DM_DAEMON_H
#define DM_DAEMON_H

#include <asm/atomic.h>
#include <asm/semaphore.h>

struct dm_daemon {
	void (*fn)(void);
	char name[16];
	atomic_t please_die;
	struct semaphore start_lock;
	struct semaphore run_lock;

	atomic_t woken;
	wait_queue_head_t job_queue;
};

int dm_daemon_start(struct dm_daemon *dd, const char *name, void (*fn)(void));
void dm_daemon_stop(struct dm_daemon *dd);
void dm_daemon_wake(struct dm_daemon *dd);
int dm_daemon_running(struct dm_daemon *dd);

#endif