1*eda14cbcSMatt Macy /* 2*eda14cbcSMatt Macy * Copyright (C) 2015 Cluster Inc. 3*eda14cbcSMatt Macy * Produced at ClusterHQ Inc (cf, DISCLAIMER). 4*eda14cbcSMatt Macy * Written by Richard Yao <richard.yao@clusterhq.com>. 5*eda14cbcSMatt Macy * 6*eda14cbcSMatt Macy * This file is part of the SPL, Solaris Porting Layer. 7*eda14cbcSMatt Macy * 8*eda14cbcSMatt Macy * The SPL is free software; you can redistribute it and/or modify it 9*eda14cbcSMatt Macy * under the terms of the GNU General Public License as published by the 10*eda14cbcSMatt Macy * Free Software Foundation; either version 2 of the License, or (at your 11*eda14cbcSMatt Macy * option) any later version. 12*eda14cbcSMatt Macy * 13*eda14cbcSMatt Macy * The SPL is distributed in the hope that it will be useful, but WITHOUT 14*eda14cbcSMatt Macy * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 15*eda14cbcSMatt Macy * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 16*eda14cbcSMatt Macy * for more details. 17*eda14cbcSMatt Macy * 18*eda14cbcSMatt Macy * You should have received a copy of the GNU General Public License along 19*eda14cbcSMatt Macy * with the SPL. If not, see <http://www.gnu.org/licenses/>. 20*eda14cbcSMatt Macy */ 21*eda14cbcSMatt Macy 22*eda14cbcSMatt Macy #ifndef _SPL_USER_H 23*eda14cbcSMatt Macy #define _SPL_USER_H 24*eda14cbcSMatt Macy 25*eda14cbcSMatt Macy /* 26*eda14cbcSMatt Macy * We have uf_info_t for areleasef(). We implement areleasef() using a global 27*eda14cbcSMatt Macy * linked list of all open file descriptors with the task structs referenced, 28*eda14cbcSMatt Macy * so accessing the correct descriptor from areleasef() only requires knowing 29*eda14cbcSMatt Macy * about the Linux task_struct. Since this is internal to our compatibility 30*eda14cbcSMatt Macy * layer, we make it an opaque type. 31*eda14cbcSMatt Macy * 32*eda14cbcSMatt Macy * XXX: If the descriptor changes under us and we do not do a getf() between 33*eda14cbcSMatt Macy * the change and using it, we would get an incorrect reference. 34*eda14cbcSMatt Macy */ 35*eda14cbcSMatt Macy 36*eda14cbcSMatt Macy struct uf_info; 37*eda14cbcSMatt Macy typedef struct uf_info uf_info_t; 38*eda14cbcSMatt Macy 39*eda14cbcSMatt Macy #define P_FINFO(x) ((uf_info_t *)x) 40*eda14cbcSMatt Macy 41*eda14cbcSMatt Macy #endif /* SPL_USER_H */ 42