2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * Copyright (C) 2001 Cluster File Systems, Inc. <braam@clusterfs.com>
6 * This file is part of Lustre, http://www.lustre.org.
8 * Lustre is free software; you can redistribute it and/or
9 * modify it under the terms of version 2 of the GNU General Public
10 * License as published by the Free Software Foundation.
12 * Lustre is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Lustre; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * Basic Lustre library routines.
25 #ifndef _DARWIN_LUSTRE_LIB_H
26 #define _DARWIN_LUSTRE_LIB_H
29 #error Do not #include this file directly. #include <lustre_lib.h> instead
33 #include <libcfs/libcfs.h>
36 #define LI_POISON ((int)0x5a5a5a5a)
37 #define LL_POISON ((long)0x5a5a5a5a)
38 #define LP_POISON ((void *)(long)0x5a5a5a5a)
47 struct obd_ioctl_data;
48 #define OBD_IOC_DATA_TYPE struct obd_ioctl_data
50 #define LUSTRE_FATAL_SIGS (sigmask(SIGKILL) | sigmask(SIGINT) | \
51 sigmask(SIGTERM) | sigmask(SIGQUIT) | \
52 sigmask(SIGALRM) | sigmask(SIGHUP))
55 static inline sigset_t l_w_e_set_sigs(sigset_t sigs)
59 /* XXX Liang: how to change sigmask in Darwin8.x?
60 * there is syscall like pthread_sigmask() but we cannot
62 #if !defined(__DARWIN8__)
63 struct proc *p = current_proc();
64 extern int block_procsigmask(struct proc *p, int bit);
65 old = cfs_current()->uu_sigmask;
66 block_procsigmask(p, ~sigs);