Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
rrm.c
Package: linux-2.4.20.tar.gz [view]
Upload User: jlfgdled
Upload Date: 2013-04-10
Package Size: 33168k
Code Size: 2k
Category:
Linux-Unix program
Development Platform:
Unix_Linux
- /*
- * Linux Rendering Resource Manager
- *
- * Implements the SGI-compatible rendering resource manager.
- * This takes care of implementing the virtualized video hardware
- * access required for OpenGL direct rendering.
- *
- * Author: Miguel de Icaza (miguel@nuclecu.unam.mx)
- *
- * Fixes:
- */
- #include <linux/module.h>
- #include <asm/uaccess.h>
- #include <asm/rrm.h>
- int
- rrm_open_rn (int rnid, void *arg)
- {
- return 0;
- }
- int
- rrm_close_rn (int rnid, void *arg)
- {
- return 0;
- }
- int
- rrm_bind_proc_to_rn (int rnid, void *arg)
- {
- return 0;
- }
- typedef int (*rrm_function )(void *arg);
- struct {
- int (*r_fn)(int rnid, void *arg);
- int arg_size;
- } rrm_functions [] = {
- { rrm_open_rn, sizeof (struct RRM_OpenRN) },
- { rrm_close_rn, sizeof (struct RRM_CloseRN) },
- { rrm_bind_proc_to_rn, sizeof (struct RRM_BindProcToRN) }
- };
- #define RRM_FUNCTIONS (sizeof (rrm_functions)/sizeof (rrm_functions [0]))
- /* cmd is a number in the range [0..RRM_CMD_LIMIT-RRM_BASE] */
- int
- rrm_command (unsigned int cmd, void *arg)
- {
- int i, rnid;
- if (cmd > RRM_FUNCTIONS){
- printk ("Called unimplemented rrm ioctl: %dn", cmd + RRM_BASE);
- return -EINVAL;
- }
- i = verify_area (VERIFY_READ, arg, rrm_functions [cmd].arg_size);
- if (i) return i;
- if (__get_user (rnid, (int *) arg))
- return -EFAULT;
- return (*(rrm_functions [cmd].r_fn))(rnid, arg);
- }
- int
- rrm_close (struct inode *inode, struct file *file)
- {
- /* This routine is invoked when the device is closed */
- return 0;
- }
- EXPORT_SYMBOL(rrm_command);
- EXPORT_SYMBOL(rrm_close);