[svn:parrot] r40492 - branches/auto_attrs/src/pmc
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Tue Aug 11 16:08:02 UTC 2009
Author: NotFound
Date: Tue Aug 11 16:07:57 2009
New Revision: 40492
URL: https://trac.parrot.org/parrot/changeset/40492
Log:
set auto_attrs on Scheduler PMC
Modified:
branches/auto_attrs/src/pmc/scheduler.pmc
Modified: branches/auto_attrs/src/pmc/scheduler.pmc
==============================================================================
--- branches/auto_attrs/src/pmc/scheduler.pmc Tue Aug 11 15:38:19 2009 (r40491)
+++ branches/auto_attrs/src/pmc/scheduler.pmc Tue Aug 11 16:07:57 2009 (r40492)
@@ -20,7 +20,7 @@
#include "parrot/scheduler_private.h"
-pmclass Scheduler need_ext {
+pmclass Scheduler need_ext auto_attrs {
ATTR INTVAL id; /* The scheduler's ID. */
ATTR INTVAL max_tid; /* The highest assigned task ID. */
@@ -48,14 +48,13 @@
VTABLE void init() {
Parrot_Scheduler_attributes * const core_struct =
- mem_allocate_zeroed_typed(Parrot_Scheduler_attributes);
+ (Parrot_Scheduler_attributes *) PMC_data(SELF);
/* Set flags for custom GC mark and destroy. */
PObj_custom_mark_SET(SELF);
PObj_active_destroy_SET(SELF);
/* Set up the core struct. */
- PMC_data(SELF) = core_struct;
core_struct->id = 0;
core_struct->max_tid = 0;
core_struct->task_list = pmc_new(interp, enum_class_Hash);
@@ -248,8 +247,6 @@
VTABLE void destroy() {
Parrot_Scheduler_attributes * const core_struct = PARROT_SCHEDULER(SELF);
MUTEX_DESTROY(core_struct->msg_lock);
- mem_sys_free(core_struct);
- PMC_data(SELF) = NULL;
}
More information about the parrot-commits
mailing list