Skip to content

Commit

Permalink
[codingstd] c_parens.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.parrot.org/parrot/branches/gsoc_threads@48747 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
jkeenan committed Sep 1, 2010
1 parent db6e8ba commit 422d018
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/threads.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Parrot_threads_init(PARROT_INTERP)
{
ASSERT_ARGS(Parrot_threads_init)
Thread_table *tbl;
INTVAL *zero = (INTVAL*) malloc(sizeof(INTVAL));
INTVAL *zero = (INTVAL*) malloc(sizeof (INTVAL));
*zero = 0;

MUTEX_INIT(interp->interp_lock);
Expand All @@ -50,12 +50,12 @@ Parrot_threads_init(PARROT_INTERP)

MUTEX_INIT(interp->thread_lock);

interp->thread_table = (Thread_table*) malloc(sizeof(Thread_table));
interp->thread_table = (Thread_table*) malloc(sizeof (Thread_table));
tbl = interp->thread_table;

tbl->size = 8; /* arbitrarily */
tbl->count = 1;
tbl->threads = (Thread_info*) malloc(sizeof(Thread_info) * tbl->size);
tbl->threads = (Thread_info*) malloc(sizeof (Thread_info) * tbl->size);
TLS_KEY_INIT(tbl->tid_key);
TLS_SET(tbl->tid_key, zero);

Expand Down Expand Up @@ -111,7 +111,7 @@ Parrot_threads_main(ARGMOD(void *args_ptr))
ASSERT_ARGS(Parrot_threads_main)
Thread_args *args = (Thread_args*) args_ptr;
Interp *interp = args->interp;
INTVAL *tidx = (INTVAL*) malloc(sizeof(INTVAL));
INTVAL *tidx = (INTVAL*) malloc(sizeof (INTVAL));
Thread_table *tbl = interp->thread_table;
free(args_ptr);

Expand Down Expand Up @@ -321,15 +321,15 @@ Parrot_threads_spawn(PARROT_INTERP)
ASSERT_ARGS(Parrot_threads_spawn)
Thread_table *tbl = interp->thread_table;
INTVAL new_idx = tbl->count;
Thread_args *args = (Thread_args*) malloc(sizeof(Thread_args));
Thread_args *args = (Thread_args*) malloc(sizeof (Thread_args));


tbl->count += 1;

/* Maybe grow table */
if (tbl->count > tbl->size) {
tbl->size *= 2;
tbl->threads = (Thread_info*) realloc(tbl, sizeof(Thread_info) * tbl->size);
tbl->threads = (Thread_info*) realloc(tbl, sizeof (Thread_info) * tbl->size);
}

args->interp = interp;
Expand Down Expand Up @@ -396,7 +396,7 @@ Parrot_threads_reap(PARROT_INTERP)
/* Shrink that table */
tbl->size /= 2;
tbl->threads = (Thread_info*) realloc(
tbl->threads, sizeof(Thread_info) * tbl->size);
tbl->threads, sizeof (Thread_info) * tbl->size);
}

UNLOCK(interp->thread_lock);
Expand Down

0 comments on commit 422d018

Please sign in to comment.