[svn:parrot] r45794 - trunk/src
petdance at svn.parrot.org
petdance at svn.parrot.org
Mon Apr 19 06:07:15 UTC 2010
Author: petdance
Date: Mon Apr 19 06:07:15 2010
New Revision: 45794
URL: https://trac.parrot.org/parrot/changeset/45794
Log:
removed unused interp args from static functions
Modified:
trunk/src/thread.c
Modified: trunk/src/thread.c
==============================================================================
--- trunk/src/thread.c Mon Apr 19 05:55:28 2010 (r45793)
+++ trunk/src/thread.c Mon Apr 19 06:07:15 2010 (r45794)
@@ -31,8 +31,7 @@
static Parrot_Interp detach(UINTVAL tid);
PARROT_CAN_RETURN_NULL
-static Shared_gc_info * get_pool(PARROT_INTERP)
- __attribute__nonnull__(1);
+static Shared_gc_info * get_pool(void);
PARROT_WARN_UNUSED_RESULT
static int is_suspended_for_gc(PARROT_INTERP)
@@ -60,13 +59,10 @@
static Parrot_Interp pt_check_tid(UINTVAL tid, ARGIN(const char *from))
__attribute__nonnull__(2);
-static int pt_gc_count_threads(PARROT_INTERP)
- __attribute__nonnull__(1);
-
-static void pt_gc_wait_for_stage(PARROT_INTERP,
+static int pt_gc_count_threads(void);
+static void pt_gc_wait_for_stage(
thread_gc_stage_enum from_stage,
- thread_gc_stage_enum to_stage)
- __attribute__nonnull__(1);
+ thread_gc_stage_enum to_stage);
static void pt_gc_wakeup_check(PARROT_INTERP)
__attribute__nonnull__(1);
@@ -90,9 +86,8 @@
static void pt_suspend_one_for_gc(PARROT_INTERP)
__attribute__nonnull__(1);
-static void pt_thread_signal(ARGIN(Parrot_Interp self), PARROT_INTERP)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
+static void pt_thread_signal(PARROT_INTERP)
+ __attribute__nonnull__(1);
static void pt_thread_wait(PARROT_INTERP)
__attribute__nonnull__(1);
@@ -101,8 +96,7 @@
static void* thread_func(ARGIN_NULLOK(void *arg));
#define ASSERT_ARGS_detach __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#define ASSERT_ARGS_get_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_get_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_is_suspended_for_gc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_make_local_args_copy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -116,10 +110,8 @@
PARROT_ASSERT_ARG(arg))
#define ASSERT_ARGS_pt_check_tid __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(from))
-#define ASSERT_ARGS_pt_gc_count_threads __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_pt_gc_wait_for_stage __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_pt_gc_count_threads __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_pt_gc_wait_for_stage __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_pt_gc_wakeup_check __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_pt_ns_clone __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -133,8 +125,7 @@
#define ASSERT_ARGS_pt_suspend_one_for_gc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_pt_thread_signal __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(self) \
- , PARROT_ASSERT_ARG(interp))
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_pt_thread_wait __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_thread_func __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
@@ -216,7 +207,7 @@
/*
-=item C<static Shared_gc_info * get_pool(PARROT_INTERP)>
+=item C<static Shared_gc_info * get_pool(void)>
Gets the shared gc information. For now this is global data; ideally it will
become something other than a static variable. If everything uses this
@@ -228,7 +219,7 @@
PARROT_CAN_RETURN_NULL
static Shared_gc_info *
-get_pool(PARROT_INTERP)
+get_pool(void)
{
ASSERT_ARGS(get_pool)
return shared_gc_info;
@@ -360,7 +351,7 @@
/*
-=item C<static void pt_thread_signal(Parrot_Interp self, PARROT_INTERP)>
+=item C<static void pt_thread_signal(PARROT_INTERP)>
Wakes up an C<interp> which should have called pt_thread_wait().
@@ -369,7 +360,7 @@
*/
static void
-pt_thread_signal(ARGIN(Parrot_Interp self), PARROT_INTERP)
+pt_thread_signal(PARROT_INTERP)
{
ASSERT_ARGS(pt_thread_signal)
COND_SIGNAL(interp->thread_data->interp_cond);
@@ -546,7 +537,7 @@
Parrot_really_destroy(interp, 0, NULL);
}
else if (interp->thread_data->state & THREAD_STATE_JOINED) {
- pt_thread_signal(interp, interp->thread_data->joiner);
+ pt_thread_signal(interp->thread_data->joiner);
}
/* make sure we don't block a GC run */
@@ -954,7 +945,7 @@
/*
-=item C<static int pt_gc_count_threads(PARROT_INTERP)>
+=item C<static int pt_gc_count_threads(void)>
Returns the number of active threads in the system (running or suspended). Be
sure to hold C<interpreter_array_mutex>.
@@ -964,7 +955,7 @@
*/
static int
-pt_gc_count_threads(PARROT_INTERP)
+pt_gc_count_threads(void)
{
ASSERT_ARGS(pt_gc_count_threads)
UINTVAL i;
@@ -986,8 +977,8 @@
/*
-=item C<static void pt_gc_wait_for_stage(PARROT_INTERP, thread_gc_stage_enum
-from_stage, thread_gc_stage_enum to_stage)>
+=item C<static void pt_gc_wait_for_stage(thread_gc_stage_enum from_stage,
+thread_gc_stage_enum to_stage)>
Waits until all threads have reached the desired stage. Takes an interpreter,
starting stage and ending stage as arguments. Updates the thread information.
@@ -998,8 +989,7 @@
*/
static void
-pt_gc_wait_for_stage(PARROT_INTERP, thread_gc_stage_enum from_stage,
- thread_gc_stage_enum to_stage)
+pt_gc_wait_for_stage(thread_gc_stage_enum from_stage, thread_gc_stage_enum to_stage)
{
ASSERT_ARGS(pt_gc_wait_for_stage)
Shared_gc_info * const info = shared_gc_info;
@@ -1011,7 +1001,7 @@
LOCK(interpreter_array_mutex);
DEBUG_ONLY(fprintf(stderr, "%p: got lock\n", interp));
- thread_count = pt_gc_count_threads(interp);
+ thread_count = pt_gc_count_threads();
PARROT_ASSERT(info->gc_stage == from_stage);
PARROT_ASSERT(!(interp->thread_data->state & THREAD_STATE_NOT_STARTED));
@@ -1061,7 +1051,7 @@
if (!info)
return;
- thread_count = pt_gc_count_threads(interp);
+ thread_count = pt_gc_count_threads();
if (info->num_reached == thread_count) {
PARROT_ASSERT(info->gc_stage == THREAD_GC_STAGE_NONE);
@@ -1578,7 +1568,7 @@
if (!running_threads)
return;
- info = get_pool(interp);
+ info = get_pool();
PARROT_ATOMIC_INT_GET(block_level, info->gc_block_level);
DEBUG_ONLY(fprintf(stderr, "start threaded mark\n"));
@@ -1623,7 +1613,7 @@
}
DEBUG_ONLY(fprintf(stderr, "%p: wait for stage\n", interp));
- pt_gc_wait_for_stage(interp, THREAD_GC_STAGE_NONE, THREAD_GC_STAGE_MARK);
+ pt_gc_wait_for_stage(THREAD_GC_STAGE_NONE, THREAD_GC_STAGE_MARK);
DEBUG_ONLY(fprintf(stderr, "actually mark\n"));
/*
@@ -1697,7 +1687,7 @@
UNLOCK(interpreter_array_mutex);
DEBUG_ONLY(fprintf(stderr, "wait to sweep\n"));
- pt_gc_wait_for_stage(interp, THREAD_GC_STAGE_MARK, THREAD_GC_STAGE_SWEEP);
+ pt_gc_wait_for_stage(THREAD_GC_STAGE_MARK, THREAD_GC_STAGE_SWEEP);
}
/*
@@ -1715,7 +1705,7 @@
Parrot_shared_gc_block(PARROT_INTERP)
{
ASSERT_ARGS(Parrot_shared_gc_block)
- Shared_gc_info * const info = get_pool(interp);
+ Shared_gc_info * const info = get_pool();
if (info) {
int level;
@@ -1739,7 +1729,7 @@
Parrot_shared_gc_unblock(PARROT_INTERP)
{
ASSERT_ARGS(Parrot_shared_gc_unblock)
- Shared_gc_info * const info = get_pool(interp);
+ Shared_gc_info * const info = get_pool();
if (info) {
int level;
PARROT_ATOMIC_INT_DEC(level, info->gc_block_level);
More information about the parrot-commits
mailing list