base/ipc/shm/shm.c File Reference


Detailed Description

Implementation of the RTAI SHM module.

Author:
Paolo Mantegazza
Note:
Copyright © 1999-2004 Paolo Mantegazza <mantegazza@aero.polimi.it>
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 2 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, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Definition in file shm.c.#include <linux/version.h>
#include <linux/module.h>
#include <linux/config.h>
#include <linux/errno.h>
#include <linux/mm.h>
#include <linux/miscdevice.h>
#include <rtai_trace.h>
#include <rtai_schedcore.h>
#include <rtai_registry.h>
#include "rtai_shm.h"

Include dependency graph for shm.c:

Include dependency graph

Go to the source code of this file.

Defines

#define RTAI_SHM_MISC_MINOR   254
#define ALIGN2PAGE(adr)   ((void *)PAGE_ALIGN((unsigned long)adr))
#define RT_SHM_OP_PERM()   (!(_rt_whoami()->is_hard))
#define GLOBAL   0
#define SPECIFIC   1
#define RTAI_TASK(return_instr)

Functions

 MODULE_LICENSE ("GPL")
void * _rt_shm_alloc (unsigned long name, int size, int suprt)
int _rt_shm_free (unsigned long name, int size)
void * rt_shm_alloc (unsigned long name, int size, int suprt)
 Allocate a chunk of memory to be shared inter-intra kernel modules and Linux processes.
int rt_shm_alloc_usp (unsigned long name, int size, int suprt)
int rt_shm_size (unsigned long *arg)
void rtai_shm_vm_open (struct vm_area_struct *vma)
void rtai_shm_vm_close (struct vm_area_struct *vma)
void rt_set_heap (unsigned long, void *)
int rtai_shm_f_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
int rtai_shm_f_mmap (struct file *file, struct vm_area_struct *vma)
void * _rt_halloc (int size, struct rt_heap_t *heap)
void _rt_hfree (void *addr, struct rt_heap_t *heap)
void * rt_halloc_typed (int size, int htype)
void rt_hfree_typed (void *addr, int htype)
void * rt_named_halloc_typed (unsigned long name, int size, int htype)
void rt_named_hfree_typed (void *adr, int htype)
void * rt_malloc_usp (int size)
void rt_free_usp (void *adr)
void * rt_named_malloc_usp (unsigned long name, int size)
void rt_named_free_usp (void *adr)
void * rt_heap_open (unsigned long name, int size, int suprt)
 Open/create a named group real time heap to be shared inter-intra kernel modules and Linux processes.
int set_rt_fun_entries (struct rt_native_fun_entry *entry)
void reset_rt_fun_entries (struct rt_native_fun_entry *entry)
int __rtai_shm_init (void)
void __rtai_shm_exit (void)
 module_init (__rtai_shm_init)
 module_exit (__rtai_shm_exit)
 EXPORT_SYMBOL (rt_shm_alloc)
 EXPORT_SYMBOL (rt_shm_free)
 EXPORT_SYMBOL (rt_named_malloc)
 EXPORT_SYMBOL (rt_named_free)
 EXPORT_SYMBOL (rt_halloc)
 EXPORT_SYMBOL (rt_hfree)
 EXPORT_SYMBOL (rt_named_halloc)
 EXPORT_SYMBOL (rt_named_hfree)
 EXPORT_SYMBOL (rt_heap_open)

Variables

int SUPRT [] = { 0, GFP_KERNEL, GFP_ATOMIC, GFP_DMA }
vm_operations_struct rtai_shm_vm_ops
file_operations rtai_shm_fops
miscdevice rtai_shm_dev
rtheap_t rtai_global_heap
void * rtai_global_heap_adr
int rtai_global_heap_size
rt_native_fun_entry rt_shm_entries []


Function Documentation

EXPORT_SYMBOL rt_heap_open   ) 
 

EXPORT_SYMBOL rt_named_hfree   ) 
 

EXPORT_SYMBOL rt_named_halloc   ) 
 

EXPORT_SYMBOL rt_hfree   ) 
 

EXPORT_SYMBOL rt_halloc   ) 
 

EXPORT_SYMBOL rt_named_free   ) 
 

EXPORT_SYMBOL rt_named_malloc   ) 
 

EXPORT_SYMBOL rt_shm_free   ) 
 

EXPORT_SYMBOL rt_shm_alloc   ) 
 

module_exit __rtai_shm_exit   ) 
 

module_init __rtai_shm_init   ) 
 


Generated on Thu Nov 20 11:55:17 2008 for RTAI API by doxygen 1.3.8