#include <id.h>
#include <malloc.h>
#include <string.h>
#include <stdlib.h>
Functions | |
int | id_table_create (IdTable *table, unsigned int size) |
Creates an id table. | |
void | id_table_destroy (IdTable *table) |
Destroys an id table. | |
IdEntry * | id_table_find_entry (IdTable *table, int hash, int key) |
void * | id_table_find (IdTable *table, int id) |
Find an id in the table. | |
void * | id_table_remove (IdTable *table, int id) |
Remove an id from the table. | |
int | id_table_insert (IdTable *table, void *data) |
Allocate an id. |
This file provides the implementation for the ID tables for threads
Hassaan Moin Khan (hkhan)
|
Creates an id table. Creates a new id table of the specified size.
|
|
Destroys an id table. Frees any memory used by the id table.
|
|
Find an id in the table. Returns the data associated with a thread id.
|
|
Allocate an id. Insert a thread into the id table with a new id.
|
|
Remove an id from the table. Removes an id from the table.
|