View of xos/include/node.h


XOS | Parent Directory | View | Download

/* Copyright (C) 2008  Emmanuel Varoquaux
 
   This file is part of XOS.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
#ifndef _NODE_H
#define _NODE_H
 
struct file_struct;
struct stat_struct;
 
void node_hold(struct file_struct *node);
void node_release(struct file_struct *node);
 
int node_get_write_access(struct file_struct *node);
int node_deny_write_access(struct file_struct *node);
int node_release_write_access(struct file_struct *node);
 
struct mapping_struct *node_get_mapping(struct file_struct *node);
 
int stat_node(const struct file_struct *node, struct stat_struct *buf);
int read_node(struct file_struct *node, unsigned long pos, void *buf, unsigned int count);
int get_path(const struct file_struct *node, char **path);
 
extern struct file_struct *const root;
 
#endif