Annotation of sys/dev/raidframe/rf_callback.h, Revision 1.1
1.1 ! nbrk 1: /* $OpenBSD: rf_callback.h,v 1.3 2002/12/16 07:01:03 tdeval Exp $ */
! 2: /* $NetBSD: rf_callback.h,v 1.3 1999/02/05 00:06:06 oster Exp $ */
! 3:
! 4: /*
! 5: * Copyright (c) 1995 Carnegie-Mellon University.
! 6: * All rights reserved.
! 7: *
! 8: * Author: Mark Holland
! 9: *
! 10: * Permission to use, copy, modify and distribute this software and
! 11: * its documentation is hereby granted, provided that both the copyright
! 12: * notice and this permission notice appear in all copies of the
! 13: * software, derivative works or modified versions, and any portions
! 14: * thereof, and that both notices appear in supporting documentation.
! 15: *
! 16: * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
! 17: * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
! 18: * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
! 19: *
! 20: * Carnegie Mellon requests users of this software to return to
! 21: *
! 22: * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
! 23: * School of Computer Science
! 24: * Carnegie Mellon University
! 25: * Pittsburgh PA 15213-3890
! 26: *
! 27: * any improvements or extensions that they make and grant Carnegie the
! 28: * rights to redistribute these changes.
! 29: */
! 30:
! 31: /*****************************************************************************
! 32: *
! 33: * rf_callback.h -- Header file for callback.c
! 34: *
! 35: * The reconstruction code must manage concurrent I/Os on multiple drives.
! 36: * It sometimes needs to suspend operation on a particular drive until some
! 37: * condition occurs. We can't block the thread, of course, or we wouldn't
! 38: * be able to manage our other outstanding I/Os. Instead we just suspend
! 39: * new activity on the indicated disk, and create a callback descriptor and
! 40: * put it someplace where it will get invoked when the condition that's
! 41: * stalling us has cleared. When the descriptor is invoked, it will call
! 42: * a function that will restart operation on the indicated disk.
! 43: *
! 44: *****************************************************************************/
! 45:
! 46: #ifndef _RF__RF_CALLBACK_H_
! 47: #define _RF__RF_CALLBACK_H_
! 48:
! 49: #include "rf_types.h"
! 50:
! 51: struct RF_CallbackDesc_s {
! 52: void (*callbackFunc) (RF_CBParam_t); /* Function to call. */
! 53: RF_CBParam_t callbackArg; /* Args to give to function, or */
! 54: RF_CBParam_t callbackArg2; /* just info about this callback. */
! 55: RF_RowCol_t row; /* Disk row and column IDs to */
! 56: RF_RowCol_t col; /* give to the callback func. */
! 57: RF_CallbackDesc_t *next; /* Next entry in list. */
! 58: };
! 59:
! 60: int rf_ConfigureCallback(RF_ShutdownList_t **);
! 61: RF_CallbackDesc_t *rf_AllocCallbackDesc(void);
! 62: void rf_FreeCallbackDesc(RF_CallbackDesc_t *);
! 63:
! 64: #endif /* !_RF__RF_CALLBACK_H_ */
CVSweb