Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
util.c File Reference
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/sched.h>
#include <linux/parser.h>
#include <linux/idr.h>
#include <linux/slab.h>
#include <net/9p/9p.h>

Go to the source code of this file.

Data Structures

struct  p9_idpool
 

Functions

struct p9_idpoolp9_idpool_create (void)
 
 EXPORT_SYMBOL (p9_idpool_create)
 
void p9_idpool_destroy (struct p9_idpool *p)
 
 EXPORT_SYMBOL (p9_idpool_destroy)
 
int p9_idpool_get (struct p9_idpool *p)
 
 EXPORT_SYMBOL (p9_idpool_get)
 
void p9_idpool_put (int id, struct p9_idpool *p)
 
 EXPORT_SYMBOL (p9_idpool_put)
 
int p9_idpool_check (int id, struct p9_idpool *p)
 
 EXPORT_SYMBOL (p9_idpool_check)
 

Function Documentation

EXPORT_SYMBOL ( p9_idpool_create  )
EXPORT_SYMBOL ( p9_idpool_destroy  )
EXPORT_SYMBOL ( p9_idpool_get  )
EXPORT_SYMBOL ( p9_idpool_put  )
EXPORT_SYMBOL ( p9_idpool_check  )
int p9_idpool_check ( int  id,
struct p9_idpool p 
)

p9_idpool_check - check if the specified id is available : id to check : pool to check

Definition at line 141 of file util.c.

struct p9_idpool* p9_idpool_create ( void  )
read

p9_idpool_create - create a new per-connection id pool

Definition at line 53 of file util.c.

void p9_idpool_destroy ( struct p9_idpool p)

p9_idpool_destroy - create a new per-connection id pool : idpool to destroy

Definition at line 73 of file util.c.

int p9_idpool_get ( struct p9_idpool p)

p9_idpool_get - allocate numeric id from pool : pool to allocate from

Bugs: This seems to be an awful generic function, should it be in idr.c with the lock included in struct idr?

Definition at line 88 of file util.c.

void p9_idpool_put ( int  id,
struct p9_idpool p 
)

p9_idpool_put - release numeric id from pool : numeric id which is being released : pool to release id into

Bugs: This seems to be an awful generic function, should it be in idr.c with the lock included in struct idr?

Definition at line 123 of file util.c.