Sync usage with man page.
[netbsd-mini2440.git] / sys / dev / raidframe / rf_callback.h
blobaf0e47f14abaccf2f3531a4a514142bdf2de80c3
1 /* $NetBSD: rf_callback.h,v 1.4.18.3 2004/09/21 13:32:50 skrll Exp $ */
2 /*
3 * Copyright (c) 1995 Carnegie-Mellon University.
4 * All rights reserved.
6 * Author: Mark Holland
8 * Permission to use, copy, modify and distribute this software and
9 * its documentation is hereby granted, provided that both the copyright
10 * notice and this permission notice appear in all copies of the
11 * software, derivative works or modified versions, and any portions
12 * thereof, and that both notices appear in supporting documentation.
14 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
15 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
16 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
18 * Carnegie Mellon requests users of this software to return to
20 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
21 * School of Computer Science
22 * Carnegie Mellon University
23 * Pittsburgh PA 15213-3890
25 * any improvements or extensions that they make and grant Carnegie the
26 * rights to redistribute these changes.
29 /*****************************************************************************************
31 * callback.h -- header file for callback.c
33 * the reconstruction code must manage concurrent I/Os on multiple drives.
34 * it sometimes needs to suspend operation on a particular drive until some
35 * condition occurs. we can't block the thread, of course, or we wouldn't
36 * be able to manage our other outstanding I/Os. Instead we just suspend
37 * new activity on the indicated disk, and create a callback descriptor and
38 * put it someplace where it will get invoked when the condition that's
39 * stalling us has cleared. When the descriptor is invoked, it will call
40 * a function that will restart operation on the indicated disk.
42 ****************************************************************************************/
44 #ifndef _RF__RF_CALLBACK_H_
45 #define _RF__RF_CALLBACK_H_
47 #include <dev/raidframe/raidframevar.h>
49 struct RF_CallbackDesc_s {
50 void (*callbackFunc) (RF_CBParam_t); /* function to call */
51 RF_CBParam_t callbackArg; /* args to give to function, or just
52 * info about this callback */
53 RF_RowCol_t col; /* column IDs to give to the callback func */
54 RF_CallbackDesc_t *next;/* next entry in list */
57 int rf_ConfigureCallback(RF_ShutdownList_t ** listp);
58 RF_CallbackDesc_t *rf_AllocCallbackDesc(void);
59 void rf_FreeCallbackDesc(RF_CallbackDesc_t * p);
61 #endif /* !_RF__RF_CALLBACK_H_ */