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>
38 #include <portals/arg-blocks.h>
40 int do_PtlGetId(nal_cb_t * nal, void *private, void *v_args, void *v_ret)
44 * ptl_handle_ni_t handle_in
47 * ptl_process_id_t * id_out
48 * ptl_id_t * gsize_out
51 PtlGetId_out *ret = v_ret;
52 lib_ni_t *ni = &nal->ni;
54 ret->id_out.nid = ni->nid;
55 ret->id_out.pid = ni->pid;
57 return ret->rc = PTL_OK;