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 dependency graph for shm.c:

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)
#define USE_UDEV_CLASS   0

Functions

 MODULE_LICENSE ("GPL")
static void * _rt_shm_alloc (unsigned long name, int size, int suprt)
static 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.
static RTAI_SYSCALL_MODE int rt_shm_alloc_usp (unsigned long name, int size, int suprt)
static int rt_shm_free (unsigned long name)
 Free a chunk of shared memory being shared inter-intra kernel modules and Linux processes.
static RTAI_SYSCALL_MODE int rt_shm_size (unsigned long *arg)
static void rtai_shm_vm_open (struct vm_area_struct *vma)
static void rtai_shm_vm_close (struct vm_area_struct *vma)
static RTAI_SYSCALL_MODE void rt_set_heap (unsigned long, void *)
static int rtai_shm_f_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
static int rtai_shm_f_mmap (struct file *file, struct vm_area_struct *vma)
static void * _rt_halloc (int size, struct rt_heap_t *heap)
static void _rt_hfree (void *addr, struct rt_heap_t *heap)
static void * rt_named_malloc (unsigned long name, int size)
 Allocate a chunk of the global real time heap in kernel/user space.
static void rt_named_free (void *adr)
 Free a named chunk of the global real time heap.
static void * rt_halloc_typed (int size, int htype)
static void rt_hfree_typed (void *addr, int htype)
static void * rt_named_halloc_typed (unsigned long name, int size, int htype)
static void rt_named_hfree_typed (void *adr, int htype)
static void * rt_halloc (int size)
 Allocate a chunk of a group real time heap in kernel/user space.
static void rt_hfree (void *adr)
 Free a chunk of a group real time heap.
static void * rt_named_halloc (unsigned long name, int size)
 Allocate a chunk of a group real time heap in kernel/user space.
static void rt_named_hfree (void *adr)
 Free a chunk of a group real time heap.
static RTAI_SYSCALL_MODE void * rt_malloc_usp (int size)
static RTAI_SYSCALL_MODE void rt_free_usp (void *adr)
static RTAI_SYSCALL_MODE void * rt_named_malloc_usp (unsigned long name, int size)
static RTAI_SYSCALL_MODE 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

static int SUPRT [] = { 0, GFP_KERNEL, GFP_ATOMIC, GFP_DMA }
static struct vm_operations_struct rtai_shm_vm_ops
static struct file_operations rtai_shm_fops
static struct 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 Tue Feb 2 17:47:41 2010 for RTAI API by  doxygen 1.4.7