Mercurial > repos > rhope
diff runtime/builtin.c @ 74:a844c623c7df
Add support for Worker type
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 01 Jul 2010 21:32:08 -0400 |
parents | f7bcf3db1342 |
children | e09c2d1d6d5b |
line wrap: on
line diff
--- a/runtime/builtin.c Sat Jun 19 23:13:41 2010 -0400 +++ b/runtime/builtin.c Thu Jul 01 21:32:08 2010 -0400 @@ -115,5 +115,13 @@ t_Boolean * b = (t_Boolean *)new_object(TYPE_BOOLEAN); b->Val = val != 0; return (object*)b; +} + +object * make_Worker(int32_t index, int16_t initialsize, int16_t initialcount) +{ + t_Worker * worker = (t_Worker *)_internal_worker_alloc(initialsize); + worker->payload.Index = index; + worker->payload.Count = initialcount; + return (object *)worker; }