1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
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>
34 #include <libcfs/kp30.h>
37 #define LI_POISON ((int)0x5a5a5a5a)
38 #define LL_POISON ((long)0x5a5a5a5a)
39 #define LP_POISON ((void *)(long)0x5a5a5a5a)
48 struct obd_ioctl_data;
49 #define OBD_IOC_DATA_TYPE struct obd_ioctl_data
51 #define LUSTRE_FATAL_SIGS (sigmask(SIGKILL) | sigmask(SIGINT) | \
52 sigmask(SIGTERM) | sigmask(SIGQUIT) | \
53 sigmask(SIGALRM) | sigmask(SIGHUP))
56 static inline sigset_t l_w_e_set_sigs(sigset_t sigs)
60 /* XXX Liang: how to change sigmask in Darwin8.x?
61 * there is syscall like pthread_sigmask() but we cannot
63 #if !defined(__DARWIN8__)
64 struct proc *p = current_proc();
65 extern int block_procsigmask(struct proc *p, int bit);
66 old = cfs_current()->uu_sigmask;
67 block_procsigmask(p, ~sigs);