worker pointer fixes, cellmalloc size fixes
git-svn-id: http://repo.ham.fi/svn/aprsc/trunk@28 3ce903b1-3385-4e86-93cd-f9a4a239f7ac
This commit is contained in:
parent
5e375aec50
commit
57858241ef
|
|
@ -106,7 +106,7 @@ cellarena_t *cellinit(int cellsize, int alignment, int lifo_policy, int createkb
|
|||
|
||||
ca->cellsize = cellsize;
|
||||
ca->alignment = alignment;
|
||||
ca->increment = alignment;
|
||||
ca->increment = cellsize;
|
||||
if ((cellsize % alignment) != 0) {
|
||||
ca->increment += alignment - cellsize % alignment;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -442,7 +442,7 @@ void workers_stop(int stop_all)
|
|||
|
||||
/* FIXME: Free the pbuf_t buffer chains of the thread! */
|
||||
|
||||
*w->prevp = NULL;
|
||||
*(w->prevp) = NULL;
|
||||
hfree(w);
|
||||
|
||||
workers_running--;
|
||||
|
|
@ -456,7 +456,8 @@ void workers_stop(int stop_all)
|
|||
void workers_start(void)
|
||||
{
|
||||
int i;
|
||||
struct worker_t *w, **prevp;
|
||||
struct worker_t * volatile w;
|
||||
struct worker_t **prevp;
|
||||
|
||||
workers_stop(0);
|
||||
|
||||
|
|
@ -473,6 +474,9 @@ void workers_start(void)
|
|||
|
||||
w = hmalloc(sizeof(*w));
|
||||
*prevp = w;
|
||||
|
||||
w->prevp = prevp;
|
||||
|
||||
w->next = NULL;
|
||||
w->id = i;
|
||||
w->shutting_down = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue