Author: paultcochrane Date: Sun Dec 9 09:18:09 2007 New Revision: 23654 Modified: trunk/src/dynext.c trunk/src/encoding.c trunk/src/encodings/fixed_8.c trunk/src/encodings/ucs2.c trunk/src/encodings/utf16.c trunk/src/encodings/utf8.c trunk/src/exceptions.c trunk/src/exec.c trunk/src/inter_cb.c trunk/src/inter_misc.c trunk/src/interpreter.c trunk/src/packfile.c trunk/src/scheduler.c trunk/src/stm/waitlist.c trunk/src/thread.c
Log: [core] Updated function documentation Modified: trunk/src/dynext.c ============================================================================== --- trunk/src/dynext.c (original) +++ trunk/src/dynext.c Sun Dec 9 09:18:09 2007 @@ -121,7 +121,7 @@ /* =item C<static void -store_lib_pmc(PARROT_INTERP, NOTNULL(NOTNULL(PMC *lib_pmc)), NOTNULL(STRING *path), +store_lib_pmc(PARROT_INTERP, NOTNULL(PMC *lib_pmc), NOTNULL(STRING *path), NOTNULL(STRING *type), NOTNULL(STRING *lib_name))> Store a C<ParrotLibrary> PMC in the interpreter's C<iglobals>. @@ -409,7 +409,7 @@ =item C<PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL static STRING * -clone_string_into(NOTNULL(Interp *d), NOTNULL(Interp *s), PMC *value)> +clone_string_into(NOTNULL(Interp *d), NOTNULL(Interp *s), NOTNULL(PMC *value))> RT#48260: Not yet documented!!! Modified: trunk/src/encoding.c ============================================================================== --- trunk/src/encoding.c (original) +++ trunk/src/encoding.c Sun Dec 9 09:18:09 2007 @@ -101,6 +101,7 @@ =item C<PARROT_API PARROT_MALLOC +PARROT_CANNOT_RETURN_NULL ENCODING * Parrot_new_encoding(SHIM_INTERP)> @@ -152,6 +153,7 @@ =item C<PARROT_API PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL const ENCODING * Parrot_load_encoding(PARROT_INTERP, NOTNULL(const char *encodingname))> @@ -417,7 +419,9 @@ /* -=item C<PARROT_API +=item C<PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL +PARROT_API const ENCODING * Parrot_default_encoding(SHIM_INTERP)> @@ -440,7 +444,7 @@ =item C<PARROT_API encoding_converter_t -Parrot_find_encoding_converter(PARROT_INTERP, ENCODING *lhs, ENCODING *rhs)> +Parrot_find_encoding_converter(PARROT_INTERP, NOTNULL(ENCODING *lhs), NOTNULL(ENCODING *rhs))> RT#48260: Not yet documented!!! Modified: trunk/src/encodings/fixed_8.c ============================================================================== --- trunk/src/encodings/fixed_8.c (original) +++ trunk/src/encodings/fixed_8.c Sun Dec 9 09:18:09 2007 @@ -154,6 +154,7 @@ /* =item C<PARROT_DOES_NOT_RETURN +PARROT_CANNOT_RETURN_NULL static STRING * to_encoding(PARROT_INTERP, SHIM(STRING *src), SHIM(STRING *dest))> @@ -265,6 +266,7 @@ /* =item C<PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL static STRING * get_codepoints(PARROT_INTERP, NOTNULL(STRING *source_string), UINTVAL offset, UINTVAL count)> @@ -290,6 +292,7 @@ /* =item C<PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL static STRING * get_bytes(PARROT_INTERP, NOTNULL(STRING *source_string), UINTVAL offset, UINTVAL count)> @@ -324,6 +327,7 @@ /* =item C<PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL static STRING * get_codepoints_inplace(PARROT_INTERP, NOTNULL(STRING *source_string), UINTVAL offset, UINTVAL count, NOTNULL(STRING *dest_string))> @@ -348,6 +352,7 @@ /* =item C<PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL static STRING * get_bytes_inplace(PARROT_INTERP, NOTNULL(STRING *source_string), UINTVAL offset, UINTVAL count, NOTNULL(STRING *return_string))> Modified: trunk/src/encodings/ucs2.c ============================================================================== --- trunk/src/encodings/ucs2.c (original) +++ trunk/src/encodings/ucs2.c Sun Dec 9 09:18:09 2007 @@ -157,7 +157,9 @@ /* -=item C<static STRING * +=item C<PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL +static STRING * to_encoding(PARROT_INTERP, NOTNULL(STRING *src), NOTNULL(STRING *dest))> RT#48260: Not yet documented!!! @@ -266,7 +268,9 @@ /* -=item C<static STRING * +=item C<PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL +static STRING * get_codepoints(PARROT_INTERP, NOTNULL(STRING *src), UINTVAL offset, UINTVAL count)> RT#48260: Not yet documented!!! @@ -304,7 +308,9 @@ /* -=item C<static STRING * +=item C<PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL +static STRING * get_bytes(PARROT_INTERP, SHIM(STRING *src), UINTVAL offset, UINTVAL count)> RT#48260: Not yet documented!!! @@ -324,7 +330,9 @@ /* -=item C<static STRING * +=item C<PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL +static STRING * get_codepoints_inplace(PARROT_INTERP, SHIM(STRING *src), UINTVAL offset, UINTVAL count, SHIM(STRING *dest_string))> @@ -346,7 +354,9 @@ /* -=item C<static STRING * +=item C<PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL +static STRING * get_bytes_inplace(PARROT_INTERP, SHIM(STRING *src), UINTVAL offset, UINTVAL count, SHIM(STRING *return_string))> @@ -423,7 +433,8 @@ /* -=item C<static UINTVAL +=item C<PARROT_WARN_UNUSED_RESULT +static UINTVAL codepoints(PARROT_INTERP, NOTNULL(STRING *src))> RT#48260: Not yet documented!!! @@ -446,7 +457,8 @@ /* -=item C<static UINTVAL +=item C<PARROT_WARN_UNUSED_RESULT +static UINTVAL bytes(PARROT_INTERP, NOTNULL(STRING *src))> RT#48260: Not yet documented!!! Modified: trunk/src/encodings/utf16.c ============================================================================== --- trunk/src/encodings/utf16.c (original) +++ trunk/src/encodings/utf16.c Sun Dec 9 09:18:09 2007 @@ -165,6 +165,7 @@ /* =item C<PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL static STRING * to_encoding(PARROT_INTERP, NOTNULL(STRING *src), NULLOK(STRING *dest))> @@ -367,7 +368,9 @@ /* -=item C<static STRING * +=item C<PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL +static STRING * get_codepoints(PARROT_INTERP, NOTNULL(STRING *src), UINTVAL offset, UINTVAL count)> RT#48260: Not yet documented!!! @@ -399,7 +402,9 @@ /* -=item C<static STRING * +=item C<PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL +static STRING * get_codepoints_inplace(PARROT_INTERP, NOTNULL(STRING *src), UINTVAL offset, UINTVAL count, NOTNULL(STRING *return_string))> @@ -431,7 +436,9 @@ /* -=item C<static STRING * +=item C<PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL +static STRING * get_bytes(PARROT_INTERP, SHIM(STRING *src), UINTVAL offset, UINTVAL count)> RT#48260: Not yet documented!!! @@ -450,7 +457,9 @@ /* -=item C<static STRING * +=item C<PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL +static STRING * get_bytes_inplace(PARROT_INTERP, SHIM(STRING *src), UINTVAL offset, UINTVAL count, SHIM(STRING *return_string))> @@ -527,7 +536,8 @@ /* -=item C<static UINTVAL +=item C<PARROT_WARN_UNUSED_RESULT +static UINTVAL codepoints(PARROT_INTERP, NOTNULL(STRING *src))> RT#48260: Not yet documented!!! @@ -553,7 +563,8 @@ /* -=item C<static UINTVAL +=item C<PARROT_WARN_UNUSED_RESULT +static UINTVAL bytes(PARROT_INTERP, NOTNULL(STRING *src))> RT#48260: Not yet documented!!! @@ -572,7 +583,8 @@ #if PARROT_HAS_ICU /* -=item C<static UINTVAL +=item C<PARROT_WARN_UNUSED_RESULT +static UINTVAL utf16_decode_and_advance(PARROT_INTERP, NOTNULL(String_iter *i))> RT#48260: Not yet documented!!! @@ -671,7 +683,8 @@ /* -=item C<ENCODING * +=item C<PARROT_CANNOT_RETURN_NULL +ENCODING * Parrot_encoding_utf16_init(PARROT_INTERP)> RT#48260: Not yet documented!!! Modified: trunk/src/encodings/utf8.c ============================================================================== --- trunk/src/encodings/utf8.c (original) +++ trunk/src/encodings/utf8.c Sun Dec 9 09:18:09 2007 @@ -263,7 +263,8 @@ /* -=item C<static void * +=item C<PARROT_CANNOT_RETURN_NULL +static void * utf8_encode(PARROT_INTERP, NOTNULL(void *ptr), UINTVAL c)> Returns the UTF-8 encoding of integer C<c>. @@ -300,7 +301,8 @@ /* -=item C<static const void * +=item C<PARROT_CANNOT_RETURN_NULL +static const void * utf8_skip_forward(NOTNULL(const void *ptr), UINTVAL n)> Moves C<ptr> C<n> characters forward. @@ -324,7 +326,9 @@ /* -=item C<static const void * +=item C<PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL +static const void * utf8_skip_backward(NOTNULL(const void *ptr), UINTVAL n)> Moves C<ptr> C<n> characters back. @@ -458,7 +462,8 @@ /* -=item C<static STRING * +=item C<PARROT_CAN_RETURN_NULL +static STRING * to_encoding(PARROT_INTERP, NOTNULL(STRING *src), NULLOK(STRING *dest))> RT#48260: Not yet documented!!! @@ -728,7 +733,8 @@ /* -=item C<static STRING * +=item C<PARROT_CANNOT_RETURN_NULL +static STRING * get_bytes_inplace(PARROT_INTERP, SHIM(STRING *src), UINTVAL offset, UINTVAL count, SHIM(STRING *return_string))> @@ -870,7 +876,8 @@ /* -=item C<ENCODING * +=item C<PARROT_CANNOT_RETURN_NULL +ENCODING * Parrot_encoding_utf8_init(PARROT_INTERP)> RT#48260: Not yet documented!!! Modified: trunk/src/exceptions.c ============================================================================== --- trunk/src/exceptions.c (original) +++ trunk/src/exceptions.c Sun Dec 9 09:18:09 2007 @@ -215,7 +215,7 @@ =item C<PARROT_API void -Parrot_push_action(PARROT_INTERP, PMC *sub)> +Parrot_push_action(PARROT_INTERP, NOTNULL(PMC *sub))> Push an action handler onto the dynamic environment. @@ -420,6 +420,7 @@ /* =item C<PARROT_WARN_UNUSED_RESULT +PARROT_CAN_RETURN_NULL PMC * get_exception_handler(PARROT_INTERP, INTVAL target_depth)> @@ -460,6 +461,7 @@ /* =item C<PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL PMC * get_all_exception_handlers(PARROT_INTERP)> @@ -533,8 +535,9 @@ =item C<PARROT_API PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL PMC* -new_c_exception_handler(PARROT_INTERP, Parrot_exception *jb)> +new_c_exception_handler(PARROT_INTERP, NOTNULL(Parrot_exception *jb))> Generate an exception handler, that catches PASM level exceptions inside a C function. This could be a separate class too, for now just a private @@ -563,7 +566,7 @@ =item C<PARROT_API void -push_new_c_exception_handler(PARROT_INTERP, Parrot_exception *jb)> +push_new_c_exception_handler(PARROT_INTERP, NOTNULL(Parrot_exception *jb))> Pushes an new C exception handler onto the stack. @@ -583,7 +586,7 @@ =item C<PARROT_API PARROT_CAN_RETURN_NULL opcode_t * -throw_exception(PARROT_INTERP, PMC *exception, SHIM(void *dest))> +throw_exception(PARROT_INTERP, NOTNULL(PMC *exception), SHIM(void *dest))> Throw the exception. @@ -617,6 +620,7 @@ =item C<PARROT_API PARROT_WARN_UNUSED_RESULT +PARROT_CAN_RETURN_NULL opcode_t * rethrow_exception(PARROT_INTERP, NOTNULL(PMC *exception))> @@ -714,7 +718,8 @@ /* -=item C<PARROT_WARN_UNUSED_RESULT +=item C<PARROT_CAN_RETURN_NULL +PARROT_WARN_UNUSED_RESULT static opcode_t * create_exception(PARROT_INTERP)> Modified: trunk/src/exec.c ============================================================================== --- trunk/src/exec.c (original) +++ trunk/src/exec.c Sun Dec 9 09:18:09 2007 @@ -66,8 +66,8 @@ /* =item C<void -Parrot_exec(PARROT_INTERP, opcode_t *pc, - opcode_t *code_start, opcode_t *code_end)> +Parrot_exec(PARROT_INTERP, NOTNULL(opcode_t *pc), + NOTNULL(opcode_t *code_start), NOTNULL(opcode_t *code_end))> Call the jit to get the program code. Adds the members of the data section. And emits the executable. @@ -264,10 +264,11 @@ /* =item C<PARROT_API +PARROT_CAN_RETURN_NULL int * Parrot_exec_add_text_rellocation_reg(NOTNULL(Parrot_exec_objfile_t *obj), - char *nptr, const char *var, int offset, - int disp)> + NOTNULL(char *nptr), NOTNULL(const char *var), + int offset, int disp)> RT#48260: Not yet documented!!! @@ -291,7 +292,7 @@ =item C<PARROT_API void Parrot_exec_add_text_rellocation_func(NOTNULL(Parrot_exec_objfile_t *obj), - char *nptr, const char *func_name)> + NOTNULL(char *nptr), NOTNULL(const char *func_name))> RT#48260: Not yet documented!!! @@ -311,8 +312,8 @@ =item C<PARROT_API void -Parrot_exec_add_text_rellocation(NOTNULL(Parrot_exec_objfile_t *obj), char *nptr, - int type, const char *symbol, int disp)> +Parrot_exec_add_text_rellocation(NOTNULL(Parrot_exec_objfile_t *obj), NOTNULL(char *nptr), + int type, NOTNULL(const char *symbol), int disp)> Adds a text rellocation to the object file. Modified: trunk/src/inter_cb.c ============================================================================== --- trunk/src/inter_cb.c (original) +++ trunk/src/inter_cb.c Sun Dec 9 09:18:09 2007 @@ -51,8 +51,8 @@ PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT PMC* -Parrot_make_cb(PARROT_INTERP, PMC* sub, PMC* user_data, - STRING *cb_signature)> +Parrot_make_cb(PARROT_INTERP, NOTNULL(PMC* sub), NOTNULL(PMC* user_data), + NOTNULL(STRING *cb_signature))> Create a callback function according to pdd16. @@ -269,7 +269,7 @@ =item C<PARROT_API void Parrot_run_callback(PARROT_INTERP, - PMC* user_data, char* external_data)> + NOTNULL(PMC* user_data), NOTNULL(char* external_data))> Run a callback function. The PMC* user_data holds all necessary items in its properties. Modified: trunk/src/inter_misc.c ============================================================================== --- trunk/src/inter_misc.c (original) +++ trunk/src/inter_misc.c Sun Dec 9 09:18:09 2007 @@ -32,8 +32,8 @@ =item C<PARROT_API void -register_nci_method(PARROT_INTERP, const int type, void *func, - const char *name, const char *proto)> +register_nci_method(PARROT_INTERP, const int type, NOTNULL(void *func), + NOTNULL(const char *name), NOTNULL(const char *proto))> Create an entry in the C<nci_method_table> for the given NCI method of PMC class C<type>. @@ -66,8 +66,8 @@ =item C<PARROT_API void -register_raw_nci_method_in_ns(PARROT_INTERP, const int type, void *func, - const char *name)> +register_raw_nci_method_in_ns(PARROT_INTERP, const int type, NOTNULL(void *func), + NOTNULL(const char *name))> RT#48260: Not yet documented!!! @@ -121,8 +121,8 @@ =item C<PARROT_API void -Parrot_compreg(PARROT_INTERP, STRING *type, - Parrot_compiler_func_t func)> +Parrot_compreg(PARROT_INTERP, NOTNULL(STRING *type), + NOTNULL(Parrot_compiler_func_t func))> Register a parser/compiler function. Modified: trunk/src/interpreter.c ============================================================================== --- trunk/src/interpreter.c (original) +++ trunk/src/interpreter.c Sun Dec 9 09:18:09 2007 @@ -539,7 +539,7 @@ /* =item C<PARROT_WARN_UNUSED_RESULT -PARROT_CANNOT_RETURN_NULL +PARROT_CAN_RETURN_NULL void * init_jit(PARROT_INTERP, NULLOK(opcode_t *pc))> Modified: trunk/src/packfile.c ============================================================================== --- trunk/src/packfile.c (original) +++ trunk/src/packfile.c Sun Dec 9 09:18:09 2007 @@ -3290,7 +3290,7 @@ PARROT_WARN_UNUSED_RESULT PARROT_CAN_RETURN_NULL PackFile_FixupEntry * -PackFile_find_fixup_entry(PARROT_INTERP, INTVAL type, char *name)> +PackFile_find_fixup_entry(PARROT_INTERP, INTVAL type, NOTNULL(char *name))> I<What does this do?> Modified: trunk/src/scheduler.c ============================================================================== --- trunk/src/scheduler.c (original) +++ trunk/src/scheduler.c Sun Dec 9 09:18:09 2007 @@ -81,7 +81,7 @@ =item C<PARROT_WARN_UNUSED_RESULT PARROT_CAN_RETURN_NULL static void* -scheduler_runloop(NOTNULL(PMC *data))> +scheduler_runloop(NOTNULL(PMC *scheduler))> The scheduler runloop is started by the interpreter. It manages the flow of concurrent scheduling for the parent interpreter, and for lightweight @@ -138,7 +138,8 @@ /* -=item C<static int +=item C<PARROT_WARN_UNUSED_RESULT +static int Parrot_cx_handle_tasks(PARROT_INTERP, NOTNULL(PMC *scheduler))> Handle the pending tasks in the scheduler's task list. Returns when there are @@ -178,7 +179,7 @@ /* -=item C<void Parrot_cx_runloop_sleep(PARROT_INTERP, NOTNULL(PMC *scheduler))> +=item C<void Parrot_cx_runloop_sleep(NOTNULL(PMC *scheduler))> Pause the scheduler runloop. Called when there are no more pending tasks in the scheduler's task list, to freeze the runloop until there are tasks to handle. Modified: trunk/src/stm/waitlist.c ============================================================================== --- trunk/src/stm/waitlist.c (original) +++ trunk/src/stm/waitlist.c Sun Dec 9 09:18:09 2007 @@ -83,7 +83,8 @@ /* -=item C<PARROT_WARN_UNUSED_RESULT +=item C<PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT static struct waitlist_thread_data * get_thread(PARROT_INTERP)> @@ -115,6 +116,7 @@ /* =item C<PARROT_WARN_UNUSED_RESULT +PARROT_CAN_RETURN_NULL static struct waitlist_thread_data * get_thread_noalloc(PARROT_INTERP)> @@ -135,7 +137,8 @@ /* -=item C<PARROT_WARN_UNUSED_RESULT +=item C<PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT static struct waitlist_entry * alloc_entry(PARROT_INTERP)> @@ -237,7 +240,7 @@ /* =item C<static void -waitlist_remove(STM_waitlist *waitlist, struct waitlist_entry *what)> +waitlist_remove(NULLOK(STM_waitlist *waitlist), NOTNULL(struct waitlist_entry *what))> RT#48260: Not yet documented!!! @@ -296,7 +299,7 @@ /* =item C<static void -waitlist_remove_check(STM_waitlist *waitlist, struct waitlist_entry *what)> +waitlist_remove_check(NULLOK(STM_waitlist *waitlist), NOTNULL(struct waitlist_entry *what))> RT#48260: Not yet documented!!! @@ -325,7 +328,7 @@ /* =item C<static void -waitlist_signal_one(struct waitlist_entry *who)> +waitlist_signal_one(NOTNULL(struct waitlist_entry *who))> RT#48260: Not yet documented!!! @@ -354,7 +357,7 @@ /* =item C<static void -waitlist_signal_all(STM_waitlist *list)> +waitlist_signal_all(NOTNULL(STM_waitlist *list))> RT#48260: Not yet documented!!! @@ -401,7 +404,7 @@ /* =item C<void -Parrot_STM_waitlist_add_self(PARROT_INTERP, STM_waitlist *waitlist)> +Parrot_STM_waitlist_add_self(PARROT_INTERP, NOTNULL(STM_waitlist *waitlist))> RT#48260: Not yet documented!!! @@ -426,7 +429,7 @@ /* =item C<void -Parrot_STM_waitlist_signal(PARROT_INTERP, STM_waitlist *waitlist)> +Parrot_STM_waitlist_signal(PARROT_INTERP, NOTNULL(STM_waitlist *waitlist))> RT#48260: Not yet documented!!! @@ -568,7 +571,8 @@ /* -=item C<static STM_tx_log * +=item C<PARROT_CANNOT_RETURN_NULL +static STM_tx_log * Parrot_STM_tx_log_alloc(PARROT_INTERP, size_t size)> RT#48260: Not yet documented!!! @@ -613,7 +617,8 @@ /* -=item C<STM_tx_log * +=item C<PARROT_CANNOT_RETURN_NULL +STM_tx_log * Parrot_STM_tx_log_get(PARROT_INTERP)> RT#48260: Not yet documented!!! Modified: trunk/src/thread.c ============================================================================== --- trunk/src/thread.c (original) +++ trunk/src/thread.c Sun Dec 9 09:18:09 2007 @@ -168,7 +168,8 @@ /* -=item C<static Shared_gc_info * get_pool(PARROT_INTERP)> +=item C<PARROT_CAN_RETURN_NULL +static Shared_gc_info * get_pool(PARROT_INTERP)> Get the shared gc information. TODO: improve the docs here. @@ -187,7 +188,7 @@ =item C<PARROT_CAN_RETURN_NULL static PMC * -make_local_args_copy(PARROT_INTERP, Parrot_Interp old_interp, PMC *args)> +make_local_args_copy(PARROT_INTERP, Parrot_Interp old_interp, NULLOK(PMC *args))> Make a local copy of the corresponding array of arguments. @@ -224,8 +225,9 @@ /* -=item C<PMC * -pt_shared_fixup(PARROT_INTERP, PMC *pmc)> +=item C<PARROT_CAN_RETURN_NULL +PMC * +pt_shared_fixup(PARROT_INTERP, NOTNULL(PMC *pmc))> Fixup a PMC to be sharable. Right now, reassigns the vtable to one owned by some master interpreter, so the PMC can be safely reused @@ -304,7 +306,7 @@ /* =item C<void -pt_thread_wait_with(PARROT_INTERP, Parrot_mutex *mutex)> +pt_thread_wait_with(PARROT_INTERP, NOTNULL(Parrot_mutex *mutex))> Wait for this interpreter to be signalled through its condition variable, dealing properly with GC issues. C<*mutex> is assumed locked on entry and @@ -407,7 +409,7 @@ =item C<PARROT_CAN_RETURN_NULL static void* -thread_func(void *arg)> +thread_func(NULLOK(void *arg))> The actual thread function. @@ -518,7 +520,8 @@ /* =item C<static void -pt_ns_clone(Parrot_Interp d, PMC *dest_ns, Parrot_Interp s, PMC *source_ns)> +pt_ns_clone(NOTNULL(Parrot_Interp d), NOTNULL(PMC *dest_ns), + NOTNULL(Parrot_Interp s), NOTNULL(PMC *source_ns))> Clone all globals from C<s> to C<d>. @@ -615,7 +618,8 @@ /* -=item C<PMC * +=item C<PARROT_CAN_RETURN_NULL +PMC * pt_transfer_sub(Parrot_Interp d, Parrot_Interp s, NULLOK(PMC *sub))> create a clone of the sub suitable for the other interpreter @@ -638,7 +642,7 @@ /* =item C<int -pt_thread_run(PARROT_INTERP, PMC* dest_interp, PMC* sub, PMC *arg)> +pt_thread_run(PARROT_INTERP, NOTNULL(PMC* dest_interp), NULLOK(PMC* sub), NULLOK(PMC *arg))> Run the C<*sub> PMC in a separate thread using interpreter in C<*dest_interp>. @@ -726,7 +730,7 @@ /* =item C<int -pt_thread_run_1(PARROT_INTERP, PMC* dest_interp, PMC* sub, PMC *arg)> +pt_thread_run_1(PARROT_INTERP, NOTNULL(PMC* dest_interp), NULLOK(PMC* sub), NULLOK(PMC *arg))> Runs a type 1 thread. Nothing is shared, both interpreters are free running without any communication. @@ -745,7 +749,7 @@ /* =item C<int -pt_thread_run_2(PARROT_INTERP, PMC* dest_interp, PMC* sub, PMC *arg)> +pt_thread_run_2(PARROT_INTERP, NOTNULL(PMC* dest_interp), NULLOK(PMC* sub), NULLOK(PMC *arg))> Runs a type 2 thread. No shared variables, threads are communicating by sending messages. @@ -764,7 +768,7 @@ /* =item C<int -pt_thread_run_3(PARROT_INTERP, PMC* dest_interp, PMC* sub, PMC *arg)> +pt_thread_run_3(PARROT_INTERP, NOTNULL(PMC* dest_interp), NULLOK(PMC* sub), NULLOK(PMC *arg))> Run a type 3 thread. Threads may have shared variables and are managed in a thread pool. @@ -828,7 +832,7 @@ /* -=item C<static void mutex_unlock(void *arg)> +=item C<static void mutex_unlock(NOTNULL(void *arg))> Unlocks the mutex C<*arg>. @@ -844,7 +848,8 @@ /* -=item C<static int is_suspended_for_gc(PARROT_INTERP)> +=item C<PARROT_WARN_UNUSED_RESULT +static int is_suspended_for_gc(PARROT_INTERP)> Returns true iff C<interp> is suspended so a global GC can be performed. interpreter_array_mutex must be held. @@ -872,7 +877,8 @@ /* -=item C<static QUEUE_ENTRY * remove_queued_suspend_gc(PARROT_INTERP)> +=item C<PARROT_CAN_RETURN_NULL +static QUEUE_ENTRY * remove_queued_suspend_gc(PARROT_INTERP)> XXX should this function be in a different file? @@ -1190,7 +1196,8 @@ /* -=item C<PMC* pt_thread_join(NOTNULL(Parrot_Interp parent), UINTVAL tid)> +=item C<PARROT_CAN_RETURN_NULL +PMC* pt_thread_join(NOTNULL(Parrot_Interp parent), UINTVAL tid)> Join (wait for) a joinable thread.