Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

irqueue.h File Reference

#include <linux/types.h>
#include <asm/spinlock.h>

Include dependency graph for irqueue.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define NAME_SIZE   32
#define HB_NOLOCK   0
#define HB_GLOBAL   1
#define HB_LOCAL   2
#define HB_SORTED   4
#define HASHBIN_SIZE   8
#define HASHBIN_MASK   0x7
#define ALIGN   __attribute__((aligned))
#define Q_NULL   { NULL, NULL, "", 0 }
#define GET_HASHBIN(x)   ( x & HASHBIN_MASK )
#define HASHBIN_GET_SIZE(hashbin)   hashbin->hb_size

Typedefs

typedef void(* FREE_FUNC )(void *arg)
typedef irqueue queue_t
typedef hashbin_t hashbin_t

Functions

hashbin_thashbin_new (int type)
int hashbin_delete (hashbin_t *hashbin, FREE_FUNC func)
int hashbin_clear (hashbin_t *hashbin, FREE_FUNC free_func)
void hashbin_insert (hashbin_t *hashbin, queue_t *entry, __u32 hashv, char *name)
void * hashbin_find (hashbin_t *hashbin, __u32 hashv, char *name)
void * hashbin_remove (hashbin_t *hashbin, __u32 hashv, char *name)
void * hashbin_remove_first (hashbin_t *hashbin)
queue_thashbin_get_first (hashbin_t *hashbin)
queue_thashbin_get_next (hashbin_t *hashbin)
void enqueue_last (queue_t **queue, queue_t *element)
void enqueue_first (queue_t **queue, queue_t *element)
queue_tdequeue_first (queue_t **queue)


Define Documentation

#define ALIGN   __attribute__((aligned))
 

Definition at line 53 of file irqueue.h.

#define GET_HASHBIN x   )     ( x & HASHBIN_MASK )
 

Definition at line 63 of file irqueue.h.

Referenced by hashbin_find(), hashbin_get_next(), hashbin_insert(), hashbin_lock(), hashbin_remove(), and hashbin_unlock().

#define HASHBIN_GET_SIZE hashbin   )     hashbin->hb_size
 

Definition at line 99 of file irqueue.h.

Referenced by irlap_discovery_confirm(), irlmp_discovery_confirm(), and irlmp_state_active().

#define HASHBIN_MASK   0x7
 

Definition at line 50 of file irqueue.h.

#define HASHBIN_SIZE   8
 

Definition at line 49 of file irqueue.h.

Referenced by hashbin_clear(), hashbin_delete(), hashbin_get_first(), hashbin_get_next(), and hashbin_new().

#define HB_GLOBAL   1
 

Definition at line 42 of file irqueue.h.

Referenced by hashbin_find(), hashbin_insert(), hashbin_lock(), hashbin_remove(), hashbin_unlock(), irda_device_init(), irlmp_init(), and irlmp_register_link().

#define HB_LOCAL   2
 

Definition at line 43 of file irqueue.h.

Referenced by hashbin_find(), hashbin_insert(), hashbin_remove(), hashbin_unlock(), ircomm_init(), ircomm_tty_init(), iriap_init(), irias_new_object(), irlan_init(), irlap_discovery_request(), irlap_init(), irttp_init(), and irtty_init().

#define HB_NOLOCK   0
 

Definition at line 41 of file irqueue.h.

#define HB_SORTED   4
 

Definition at line 44 of file irqueue.h.

Referenced by hashbin_insert().

#define NAME_SIZE   32
 

Definition at line 36 of file irqueue.h.

#define Q_NULL   { NULL, NULL, "", 0 }
 

Definition at line 56 of file irqueue.h.


Typedef Documentation

typedef void(* FREE_FUNC)(void *arg)
 

Definition at line 58 of file irqueue.h.

typedef struct hashbin_t hashbin_t
 

typedef struct irqueue queue_t
 

Definition at line 72 of file irqueue.h.


Function Documentation

queue_t* dequeue_first queue_t **  queue  ) 
 

Definition at line 677 of file irqueue.c.

References IRDA_DEBUG, NULL, and ret.

Referenced by hashbin_clear(), hashbin_delete(), irda_ioctl(), and irda_read().

void enqueue_first queue_t **  queue,
queue_t element
 

Definition at line 587 of file irqueue.c.

References IRDA_DEBUG, and NULL.

Referenced by hashbin_insert().

void enqueue_last queue_t **  queue,
queue_t element
[inline]
 

Definition at line 569 of file irqueue.c.

References __enqueue_last(), cli, restore_flags, and save_flags.

Referenced by irda_execute_as_process(), and irmanager_notify().

Here is the call graph for this function:

int hashbin_clear hashbin_t hashbin,
FREE_FUNC  free_func
 

Definition at line 80 of file irqueue.c.

References ASSERT, dequeue_first(), HASHBIN_SIZE, HB_MAGIC, hashbin_t::hb_size, i, hashbin_t::magic, and NULL.

Here is the call graph for this function:

int hashbin_delete hashbin_t hashbin,
FREE_FUNC  func
 

Definition at line 113 of file irqueue.c.

References ASSERT, dequeue_first(), HASHBIN_SIZE, HB_MAGIC, i, kfree(), hashbin_t::magic, and NULL.

Referenced by __irias_delete_object(), irda_device_cleanup(), iriap_cleanup(), irlan_cleanup(), irlap_cleanup(), irlap_discovery_request(), irlmp_add_discovery_log(), and irlmp_cleanup().

Here is the call graph for this function:

void* hashbin_find hashbin_t hashbin,
__u32  hashv,
char *  name
 

Definition at line 274 of file irqueue.c.

References ASSERT, cli, entry, FALSE, found, GET_HASHBIN, hash, HB_GLOBAL, HB_LOCAL, HB_MAGIC, hashbin_t::hb_type, IRDA_DEBUG, hashbin_t::magic, NULL, restore_flags, save_flags, spin_lock_irqsave, spin_unlock_irq, strcmp, and TRUE.

Referenced by ircomm_lmp_flow_control(), ircomm_tty_open(), irda_device_dongle_init(), irda_device_register_dongle(), irda_register_compressor(), irda_set_compression(), irias_find_attrib(), irias_find_object(), irias_object_change_attribute(), irlmp_connect_request(), irlmp_dup(), irlmp_register_client(), irlmp_register_service(), irlmp_unregister_client(), irlmp_unregister_service(), irlmp_update_client(), and irttp_dup().

queue_t* hashbin_get_first hashbin_t hashbin  ) 
 

Definition at line 460 of file irqueue.c.

References ASSERT, entry, HASHBIN_SIZE, HB_MAGIC, i, and NULL.

Referenced by discovery_proc_read(), hashbin_remove_first(), ircomm_tty_discovery_indication(), ircomm_tty_read_proc(), irda_discover_daddr_and_lsap_sel(), irda_getsockopt(), irlan_client_discovery_indication(), irlmp_add_discovery(), irlmp_connect_request(), irlmp_discovery_confirm(), irlmp_do_discovery(), irlmp_dump_discoveries(), irlmp_expire_discoveries(), irlmp_find_device(), irlmp_find_lsap(), irlmp_notify_client(), irlmp_slsap_inuse(), irlmp_state_active(), irlmp_state_u_connect(), and irlmp_unregister_service().

queue_t* hashbin_get_next hashbin_t hashbin  ) 
 

Definition at line 492 of file irqueue.c.

References ASSERT, entry, GET_HASHBIN, HASHBIN_SIZE, HB_MAGIC, i, and NULL.

Referenced by discovery_proc_read(), ircomm_tty_discovery_indication(), ircomm_tty_read_proc(), irda_discover_daddr_and_lsap_sel(), irda_getsockopt(), irlmp_add_discovery(), irlmp_discovery_confirm(), irlmp_do_discovery(), irlmp_dump_discoveries(), irlmp_expire_discoveries(), irlmp_find_device(), irlmp_find_lsap(), irlmp_notify_client(), irlmp_slsap_inuse(), irlmp_state_active(), irlmp_state_u_connect(), and irlmp_unregister_service().

void hashbin_insert hashbin_t hashbin,
queue_t entry,
__u32  hashv,
char *  name
 

Definition at line 213 of file irqueue.c.

References ASSERT, cli, enqueue_first(), GET_HASHBIN, hash, HB_GLOBAL, HB_LOCAL, HB_MAGIC, hashbin_t::hb_size, HB_SORTED, hashbin_t::hb_type, IRDA_DEBUG, hashbin_t::magic, NULL, restore_flags, save_flags, spin_lock_irqsave, spin_unlock_irq, and strncpy.

Referenced by ircomm_open(), ircomm_tty_open(), irda_device_register_dongle(), irda_register_compressor(), irda_task_execute(), iriap_open(), irias_add_attrib(), irias_insert_object(), irlan_open(), irlap_open(), irlap_state_query(), irlmp_add_discovery(), irlmp_connect_request(), irlmp_disconnect_indication(), irlmp_disconnect_request(), irlmp_dup(), irlmp_open_lsap(), irlmp_register_client(), irlmp_register_link(), irlmp_register_service(), irlmp_state_connect(), irttp_dup(), irttp_open_tsap(), and irtty_open().

Here is the call graph for this function:

hashbin_t* hashbin_new int  type  ) 
 

Definition at line 48 of file irqueue.c.

References HASHBIN_SIZE, HB_MAGIC, i, kmalloc(), memset, NULL, and SPIN_LOCK_UNLOCKED.

Referenced by ircomm_init(), ircomm_tty_init(), irda_device_init(), iriap_init(), irias_new_object(), irlan_init(), irlap_discovery_request(), irlap_init(), irlmp_init(), irlmp_register_link(), irttp_init(), and irtty_init().

Here is the call graph for this function:

void* hashbin_remove hashbin_t hashbin,
__u32  hashv,
char *  name
 

Definition at line 366 of file irqueue.c.

References ASSERT, cli, dequeue_general(), entry, FALSE, found, GET_HASHBIN, hash, hashbin_t::hb_current, HB_GLOBAL, HB_LOCAL, HB_MAGIC, hashbin_t::hb_size, hashbin_t::hb_type, IRDA_DEBUG, hashbin_t::magic, NULL, restore_flags, save_flags, spin_lock_irqsave, spin_unlock_irq, strcmp, and TRUE.

Referenced by hashbin_remove_first(), ircomm_close(), irda_device_unregister_dongle(), irda_task_delete(), irda_unregister_compressor(), iriap_close(), irias_delete_object(), irlap_close(), irlmp_add_discovery(), irlmp_close_lsap(), irlmp_connect_request(), irlmp_disconnect_indication(), irlmp_disconnect_request(), irlmp_expire_discoveries(), irlmp_state_connect(), irlmp_unregister_client(), irlmp_unregister_link(), irlmp_unregister_service(), irttp_close_tsap(), and irtty_close().

Here is the call graph for this function:

void* hashbin_remove_first hashbin_t hashbin  ) 
 

Definition at line 342 of file irqueue.c.

References cli, entry, hashbin_get_first(), hashbin_remove(), NULL, restore_flags, and save_flags.

Referenced by irlmp_add_discovery_log().

Here is the call graph for this function: