source: trunk/athena/lib/locker/man/locker_iterate_attachtab.3 @ 12781

Revision 12781, 2.2 KB checked in by danw, 26 years ago (diff)
These functions takes "locker_context"s, not "locker_context *"s (except locker_init, which takes a *, not a **)
Line 
1.\" $Id: locker_iterate_attachtab.3,v 1.2 1999-03-27 17:34:01 danw Exp $
2.\"
3.\" Copyright 1997 by the Massachusetts Institute of Technology.
4.\"
5.\" Permission to use, copy, modify, and distribute this
6.\" software and its documentation for any purpose and without
7.\" fee is hereby granted, provided that the above copyright
8.\" notice appear in all copies and that both that copyright
9.\" notice and this permission notice appear in supporting
10.\" documentation, and that the name of M.I.T. not be used in
11.\" advertising or publicity pertaining to distribution of the
12.\" software without specific, written prior permission.
13.\" M.I.T. makes no representations about the suitability of
14.\" this software for any purpose.  It is provided "as is"
15.\" without express or implied warranty.
16.\"
17.TH LOCKER_ITERATE_ATTACHTAB 3
18.SH NAME
19locker_iterate_attachtab \- Iterate through the entries in the
20attachtab
21.SH SYNOPSIS
22.nf
23.B #include <locker.h>
24.PP
25.B
26typedef int (*locker_callback)(locker_context, locker_attachent *,
27.B
28        void *)
29.PP
30.B
31int locker_iterate_attachtab(locker_context \fIcontext\fP,
32.B
33        locker_callback \fItest\fP, void *\fItestarg\fP,
34.B
35        locker_callback \fIact\fP, void *\fIactarg\fP)
36.PP
37.B cc file.c -llocker ...
38.fi
39.SH DESCRIPTION
40The
41.B locker_iterate_attachtab
42function reads each attachtab entry in the attachtab directory in
43turn. For each attached locker, the
44.I test
45function (if non-NULL) is called with a
46.I locker_attachent
47corresponding to that locker, and the supplied
48.I testarg\fP.
49If
50.I test
51returns true (or was NULL),
52.B locker_iterate_attachtab
53then calls the
54.I act
55function, with the same
56.I locker_attachent
57and the
58.I actarg\fP.
59.PP
60As a side effect,
61.B locker_iterate_attachtab
62deletes any empty or malformed entries from the attachtab directory.
63.PP
64See
65.BR locker_read_attachent (3)
66for more information about the format of a
67.I locker_attachent\fP.
68.SH RETURN VALUES
69.B locker_iterate_attachtab
70returns
71.I LOCKER_EATTACHTAB
72if it couldn't open or lock the attachtab directory,
73.I LOCKER_ENOMEM
74if it runs out of memory,
75or
76.I LOCKER_SUCCESS
77if it runs successfully.
78.SH SEE ALSO
79locker_init(3), locker_check_owner(3), locker_check_host(3)
80.SH AUTHOR
81Dan Winship, MIT Information Systems
82.br
83Copyright 1998 by the Massachusetts Institute of Technology.
Note: See TracBrowser for help on using the repository browser.