1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
6 * Process identification routines
7 * Copyright (C) 2001-2003 Cluster File Systems, Inc.
8 * Copyright (C) 2001-2003 Cluster File Systems, Inc.
11 * This file is part of Lustre, http://www.sf.net/projects/lustre/
13 * Lustre is free software; you can redistribute it and/or
14 * modify it under the terms of version 2 of the GNU General Public
15 * License as published by the Free Software Foundation.
17 * Lustre is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with Lustre; if not, write to the Free Software
24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 /* This should be removed. The NAL should have the PID information */
28 #define DEBUG_SUBSYSTEM S_PORTALS
30 #if defined (__KERNEL__)
31 # include <linux/kernel.h>
32 extern int getpid(void);
37 #include <portals/lib-p30.h>
40 lib_api_get_id(nal_t *apinal, ptl_process_id_t *pid)
42 lib_nal_t *nal = apinal->nal_data;
44 *pid = nal->libnal_ni.ni_pid;