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

irqueue.c File Reference

#include <net/irda/irda.h>
#include <net/irda/irqueue.h>
#include <net/irda/irmod.h>

Include dependency graph for irqueue.c:

Go to the source code of this file.

Functions

static queue_tdequeue_general (queue_t **queue, queue_t *element)
static __u32 hash (char *name)
hashbin_thashbin_new (int type)
int hashbin_clear (hashbin_t *hashbin, FREE_FUNC free_func)
int hashbin_delete (hashbin_t *hashbin, FREE_FUNC free_func)
void hashbin_lock (hashbin_t *hashbin, __u32 hashv, char *name, unsigned long flags)
void hashbin_unlock (hashbin_t *hashbin, __u32 hashv, char *name, unsigned long flags)
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_first (hashbin_t *hashbin)
void * hashbin_remove (hashbin_t *hashbin, __u32 hashv, char *name)
queue_thashbin_get_first (hashbin_t *hashbin)
queue_thashbin_get_next (hashbin_t *hashbin)
static void __enqueue_last (queue_t **queue, queue_t *element)
void enqueue_last (queue_t **queue, queue_t *element)
void enqueue_first (queue_t **queue, queue_t *element)
void enqueue_queue (queue_t **queue, queue_t **list)
queue_tdequeue_first (queue_t **queue)


Function Documentation

static void __enqueue_last queue_t **  queue,
queue_t element
[static]
 

Definition at line 545 of file irqueue.c.

References IRDA_DEBUG, and NULL.

Referenced by enqueue_last().

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().

static queue_t * dequeue_general queue_t **  queue,
queue_t element
[static]
 

Definition at line 718 of file irqueue.c.

References IRDA_DEBUG, NULL, and ret.

Referenced by hashbin_remove().

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:

void enqueue_queue queue_t **  queue,
queue_t **  list
 

Definition at line 619 of file irqueue.c.

References NULL, and tmp.

static __u32 hash char *  name  )  [static]
 

Definition at line 762 of file irqueue.c.

References g, and h.

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  free_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:

void hashbin_lock hashbin_t hashbin,
__u32  hashv,
char *  name,
unsigned long  flags
 

Definition at line 150 of file irqueue.c.

References ASSERT, cli, GET_HASHBIN, hash, HB_GLOBAL, HB_MAGIC, hashbin_t::hb_type, IRDA_DEBUG, hashbin_t::magic, NULL, save_flags, and spin_lock_irqsave.

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:

void hashbin_unlock hashbin_t hashbin,
__u32  hashv,
char *  name,
unsigned long  flags
 

Definition at line 182 of file irqueue.c.

References ASSERT, GET_HASHBIN, hash, HB_GLOBAL, HB_LOCAL, HB_MAGIC, hashbin_t::hb_type, IRDA_DEBUG, hashbin_t::magic, NULL, restore_flags, and spin_unlock_irq.