File: LockDev.xs

package info (click to toggle)
liblockdev 0.9a
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 128 kB
  • ctags: 58
  • sloc: ansic: 489; makefile: 166; perl: 44; sh: 29
file content (71 lines) | stat: -rw-r--r-- 869 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#ifdef __cplusplus
extern "C" {
#endif
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#ifdef __cplusplus
}
#endif

#include "lockdev.h"

static int
not_here(s)
char *s;
{
    croak("%s not implemented on this architecture", s);
    return -1;
}

static double
constant(name, arg)
char *name;
int arg;
{
    errno = 0;
    switch (*name) {
    }
    errno = EINVAL;
    return 0;

not_there:
    errno = ENOENT;
    return 0;
}


MODULE = LockDev		PACKAGE = LockDev		


double
constant(name,arg)
	char *		name
	int		arg

pid_t
is_dev_lock( devname)
	const char * devname;
    OUTPUT:
	RETVAL

pid_t
lock_dev ( devname)
	const char * devname;
    OUTPUT:
	RETVAL

pid_t
relock_dev ( devname, old_pid)
	const char * devname;
	const pid_t old_pid;
    OUTPUT:
	RETVAL

pid_t
unlock_dev ( devname, pid)
	const char * devname;
	const pid_t pid;
    OUTPUT:
	RETVAL