Commit 9bcc295e authored by stolz's avatar stolz
Browse files

[project @ 2002-06-26 08:20:25 by stolz]

The "Ouch"-commit:
 - didn't notice my local change to libraries/Makefile
 - forgot to register new files
parent fbbed914
#include "PosixSource.h"
#include "ThreadLabels.h"
HashTable * threadLabels = NULL;
void
initThreadLabelTable(void)
{
ASSERT(threadLabels == NULL);
threadLabels = allocHashTable();
}
void
updateThreadLabel(StgWord key, void *data)
{
removeThreadLabel(key);
insertHashTable(threadLabels,key,data);
}
void *
lookupThreadLabel(StgWord key)
{
return lookupHashTable(threadLabels,key);
}
void
removeThreadLabel(StgWord key)
{
void * old = NULL;
if ((old = lookupHashTable(threadLabels,key))) {
removeHashTable(threadLabels,key,old);
free(old);
}
}
#include "Rts.h"
#include "Hash.h"
extern HashTable * threadLabels;
void
initThreadLabelTable(void);
void
updateThreadLabel(StgWord key, void *data);
void *
lookupThreadLabel(StgWord key);
void
removeThreadLabel(StgWord key);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment