[svn:parrot] r37826 - in trunk: src t/codingstd
coke at svn.parrot.org
coke at svn.parrot.org
Tue Mar 31 15:40:50 UTC 2009
Author: coke
Date: Tue Mar 31 15:40:48 2009
New Revision: 37826
URL: https://trac.parrot.org/parrot/changeset/37826
Log:
[t/docs] add more function doc signatures.
Modified:
trunk/src/debug.c
trunk/src/misc.c
trunk/src/oo.c
trunk/src/sub.c
trunk/src/tsq.c
trunk/t/codingstd/c_function_docs.t
Modified: trunk/src/debug.c
==============================================================================
--- trunk/src/debug.c Tue Mar 31 02:51:28 2009 (r37825)
+++ trunk/src/debug.c Tue Mar 31 15:40:48 2009 (r37826)
@@ -573,6 +573,14 @@
{ "watch", '\0', &cmd_watch }
};
+/*
+
+=item C<static const DebuggerCmd * get_cmd(const char **cmd)>
+
+=cut
+
+*/
+
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
static const DebuggerCmd *
@@ -623,6 +631,14 @@
}
}
+/*
+
+=item C<static const char * skip_whitespace(const char *cmd)>
+
+=cut
+
+*/
+
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static const char *
@@ -634,6 +650,15 @@
return cmd;
}
+/*
+
+=item C<static unsigned long get_uint(const char **cmd, unsigned int def)>
+
+=cut
+
+*/
+
+
PARROT_WARN_UNUSED_RESULT
static unsigned long
get_uint(ARGMOD(const char **cmd), unsigned int def)
@@ -648,6 +673,15 @@
return result;
}
+/*
+
+=item C<static unsigned long get_ulong(const char **cmd, unsigned long def)>
+
+=cut
+
+*/
+
+
PARROT_WARN_UNUSED_RESULT
static unsigned long
get_ulong(ARGMOD(const char **cmd), unsigned long def)
@@ -664,7 +698,7 @@
/*
-=item C<static void chop_newline>
+=item C<static void chop_newline(char * buf)>
If the C string argument end with a newline, delete it.
@@ -684,7 +718,7 @@
/*
-=item C<static const char * nextarg>
+=item C<static const char * nextarg(const char *command)>
Returns the position just past the current argument in the PASM instruction
C<command>. This is not the same as C<skip_command()>, which is intended for
@@ -717,7 +751,7 @@
/*
-=item C<static const char * skip_command>
+=item C<static const char * skip_command(const char *str)>
Returns the pointer past the current debugger command. (This is an
alternative to the C<skip_command()> macro above.)
@@ -743,7 +777,7 @@
/*
-=item C<static const char * parse_int>
+=item C<static const char * parse_int(const char *str, int *intP)>
Parse an C<int> out of a string and return a pointer to just after the C<int>.
The output parameter C<intP> contains the parsed value.
@@ -767,7 +801,7 @@
/*
-=item C<static const char * parse_string>
+=item C<static const char * parse_string(PARROT_INTERP, const char *str, STRING **strP)>
Parse a double-quoted string out of a C string and return a pointer to
just after the string. The parsed string is converted to a Parrot
@@ -816,7 +850,7 @@
/*
-=item C<static const char* parse_key>
+=item C<static const char* parse_key(PARROT_INTERP, const char *str, PMC **keyP)>
Parse an aggregate key out of a string and return a pointer to just
after the key. Currently only string and integer keys are allowed.
@@ -869,7 +903,7 @@
/*
-=item C<static void debugger_cmdline>
+=item C<static void debugger_cmdline(PARROT_INTERP)>
Debugger command line.
@@ -902,7 +936,7 @@
/*
-=item C<static void close_script_file>
+=item C<static void close_script_file(PARROT_INTERP)>
Close the script file, returning to command prompt mode.
@@ -926,7 +960,7 @@
/*
-=item C<void Parrot_debugger_init>
+=item C<void Parrot_debugger_init(PARROT_INTERP)>
Initializes the Parrot debugger, if it's not already initialized.
@@ -962,7 +996,7 @@
/*
-=item C<void Parrot_debugger_destroy>
+=item C<void Parrot_debugger_destroy(PARROT_INTERP)>
Destroy the current Parrot debugger instance.
@@ -994,7 +1028,7 @@
/*
-=item C<void Parrot_debugger_load>
+=item C<void Parrot_debugger_load(PARROT_INTERP, STRING *filename)>
Loads a Parrot source file for the current program.
@@ -1021,7 +1055,7 @@
/*
-=item C<void Parrot_debugger_start>
+=item C<void Parrot_debugger_start(PARROT_INTERP, opcode_t * cur_opcode)>
Start debugger.
@@ -1063,7 +1097,7 @@
/*
-=item C<void Parrot_debugger_break>
+=item C<void Parrot_debugger_break(PARROT_INTERP, opcode_t * cur_opcode)>
Breaks execution and drops into the debugger. If we are already into the
debugger and it is the first call, set a breakpoint.
@@ -1119,7 +1153,7 @@
/*
-=item C<void PDB_get_command>
+=item C<void PDB_get_command(PARROT_INTERP)>
Get a command from the user input to execute.
@@ -1244,7 +1278,7 @@
/*
-=item C<void PDB_script_file>
+=item C<void PDB_script_file(PARROT_INTERP, const char *command)>
Interprets the contents of a file as user input commands
@@ -1280,7 +1314,7 @@
/*
-=item C<int PDB_run_command>
+=item C<int PDB_run_command(PARROT_INTERP, const char *command)>
Run a command.
@@ -1331,7 +1365,7 @@
/*
-=item C<void PDB_next>
+=item C<void PDB_next(PARROT_INTERP, const char *command)>
Execute the next N operation(s).
@@ -1396,7 +1430,7 @@
/*
-=item C<void PDB_trace>
+=item C<void PDB_trace(PARROT_INTERP, const char *command)>
Execute the next N operations; if no number is specified, it defaults to 1.
@@ -1452,6 +1486,14 @@
TRACEDEB_MSG("PDB_trace finished");
}
+/*
+
+=item C<static unsigned short condition_regtype(const char *cmd)>
+
+=cut
+
+*/
+
static unsigned short
condition_regtype(ARGIN(const char *cmd))
{
@@ -1476,7 +1518,7 @@
/*
-=item C<PDB_condition_t * PDB_cond>
+=item C<PDB_condition_t * PDB_cond(PARROT_INTERP, const char *command)>
Analyzes a condition from the user input.
@@ -1648,7 +1690,7 @@
/*
-=item C<void PDB_watchpoint>
+=item C<void PDB_watchpoint(PARROT_INTERP, const char *command)>
Set a watchpoint.
@@ -1675,7 +1717,7 @@
/*
-=item C<void PDB_set_break>
+=item C<void PDB_set_break(PARROT_INTERP, const char *command)>
Set a break point, the source code file must be loaded.
@@ -1797,6 +1839,14 @@
Parrot_io_eprintf(pdb->debugger, " pos %li\n", newbreak->pc - interp->code->base.data);
}
+/*
+
+=item C<static void list_breakpoints(PDB_t *pdb)>
+
+=cut
+
+*/
+
static void
list_breakpoints(ARGIN(PDB_t *pdb))
{
@@ -1815,7 +1865,7 @@
/*
-=item C<void PDB_init>
+=item C<void PDB_init(PARROT_INTERP, const char *command)>
Init the program.
@@ -1839,7 +1889,7 @@
/*
-=item C<void PDB_continue>
+=item C<void PDB_continue(PARROT_INTERP, const char *command)>
Continue running the program. If a number is specified, skip that many
breakpoints.
@@ -1897,7 +1947,7 @@
/*
-=item C<PDB_breakpoint_t * PDB_find_breakpoint>
+=item C<PDB_breakpoint_t * PDB_find_breakpoint(PARROT_INTERP, const char *command)>
Find breakpoint number N; returns C<NULL> if the breakpoint doesn't
exist or if no breakpoint was specified.
@@ -1940,7 +1990,7 @@
/*
-=item C<void PDB_disable_breakpoint>
+=item C<void PDB_disable_breakpoint(PARROT_INTERP, const char *command)>
Disable a breakpoint; it can be reenabled with the enable command.
@@ -1961,7 +2011,7 @@
/*
-=item C<void PDB_enable_breakpoint>
+=item C<void PDB_enable_breakpoint(PARROT_INTERP, const char *command)>
Reenable a disabled breakpoint; if the breakpoint was not disabled, has
no effect.
@@ -1983,7 +2033,7 @@
/*
-=item C<void PDB_delete_breakpoint>
+=item C<void PDB_delete_breakpoint(PARROT_INTERP, const char *command)>
Delete a breakpoint.
@@ -2032,7 +2082,7 @@
/*
-=item C<void PDB_delete_condition>
+=item C<void PDB_delete_condition(PARROT_INTERP, PDB_breakpoint_t *breakpoint)>
Delete a condition associated with a breakpoint.
@@ -2065,7 +2115,7 @@
/*
-=item C<void PDB_skip_breakpoint>
+=item C<void PDB_skip_breakpoint(PARROT_INTERP, unsigned long i)>
Skip C<i> times all breakpoints.
@@ -2086,7 +2136,7 @@
/*
-=item C<char PDB_program_end>
+=item C<char PDB_program_end(PARROT_INTERP)>
End the program.
@@ -2111,7 +2161,7 @@
/*
-=item C<char PDB_check_condition>
+=item C<char PDB_check_condition(PARROT_INTERP, const PDB_condition_t *condition)>
Returns true if the condition was met.
@@ -2221,7 +2271,7 @@
/*
-=item C<static PDB_breakpoint_t * current_breakpoint>>
+=item C<static PDB_breakpoint_t * current_breakpoint(PDB_t * pdb)>
Returns a pointer to the breakpoint at the current position,
or NULL if there is none.
@@ -2246,7 +2296,7 @@
/*
-=item C<char PDB_break>
+=item C<char PDB_break(PARROT_INTERP)>
Returns true if we have to stop running.
@@ -2316,7 +2366,7 @@
/*
-=item C<char * PDB_escape>
+=item C<char * PDB_escape(const char *string, UINTVAL length)>
Escapes C<">, C<\r>, C<\n>, C<\t>, C<\a> and C<\\>.
@@ -2388,7 +2438,7 @@
/*
-=item C<int PDB_unescape>
+=item C<int PDB_unescape(char *string)>
Do inplace unescape of C<\r>, C<\n>, C<\t>, C<\a> and C<\\>.
@@ -2443,7 +2493,9 @@
/*
-=item C<size_t PDB_disassemble_op>
+=item C<size_t PDB_disassemble_op(PARROT_INTERP, char *dest, size_t space,
+const op_info_t *info, const opcode_t *op, PDB_file_t *file,
+const opcode_t *code_start, int full_name)>
Disassembles C<op>.
@@ -2755,7 +2807,7 @@
/*
-=item C<void PDB_disassemble>
+=item C<void PDB_disassemble(PARROT_INTERP, const char *command)>
Disassemble the bytecode.
@@ -2857,7 +2909,8 @@
/*
-=item C<long PDB_add_label>
+=item C<long PDB_add_label(PDB_file_t *file, const opcode_t *cur_opcode,
+opcode_t offset)>
Add a label to the label list.
@@ -2903,7 +2956,7 @@
/*
-=item C<void PDB_free_file>
+=item C<void PDB_free_file(PARROT_INTERP, PDB_file_t *file)>
Frees any allocated source files.
@@ -2952,7 +3005,7 @@
/*
-=item C<void PDB_load_source>
+=item C<void PDB_load_source(PARROT_INTERP, const char *command)>
Load a source code file.
@@ -3057,7 +3110,7 @@
/*
-=item C<char PDB_hasinstruction>
+=item C<char PDB_hasinstruction(const char *c)>
Return true if the line has an instruction.
@@ -3104,7 +3157,7 @@
/*
-=item C<void PDB_list>
+=item C<void PDB_list(PARROT_INTERP, const char *command)>
Show lines from the source code file.
@@ -3173,7 +3226,7 @@
/*
-=item C<void PDB_eval>
+=item C<void PDB_eval(PARROT_INTERP, const char *command)>
C<eval>s an instruction.
@@ -3194,7 +3247,7 @@
/*
-=item C<opcode_t * PDB_compile>
+=item C<opcode_t * PDB_compile(PARROT_INTERP, const char *command)>
Compiles instructions with the PASM compiler.
@@ -3231,7 +3284,7 @@
/*
-=item C<static void dump_string>
+=item C<static void dump_string(PARROT_INTERP, const STRING *s)>
Dumps the buflen, flags, bufused, strlen, and offset associated with a string
and the string itself.
@@ -3258,7 +3311,7 @@
/*
-=item C<void PDB_print>
+=item C<void PDB_print(PARROT_INTERP, const char *command)>
Print interp registers.
@@ -3277,7 +3330,7 @@
/*
-=item C<void PDB_info>
+=item C<void PDB_info(PARROT_INTERP)>
Print the interpreter info.
@@ -3322,7 +3375,7 @@
/*
-=item C<void PDB_help>
+=item C<void PDB_help(PARROT_INTERP, const char *command)>
Print the help text. "Help" with no arguments prints a list of commands.
"Help xxx" prints information on command xxx.
@@ -3364,7 +3417,7 @@
/*
-=item C<void PDB_backtrace>
+=item C<void PDB_backtrace(PARROT_INTERP)>
Prints a backtrace of the interp's call chain.
@@ -3481,7 +3534,7 @@
/*
-=item C<static const char* GDB_print_reg>
+=item C<static const char* GDB_print_reg(PARROT_INTERP, int t, int n)>
Used by GDB_P to convert register values for display. Takes register
type and number as arguments.
@@ -3521,7 +3574,7 @@
/*
-=item C<static const char* GDB_P>
+=item C<static const char* GDB_P(PARROT_INTERP, const char *s)>
Used by PDB_print to print register values. Takes a pointer to the
register name(s).
Modified: trunk/src/misc.c
==============================================================================
--- trunk/src/misc.c Tue Mar 31 02:51:28 2009 (r37825)
+++ trunk/src/misc.c Tue Mar 31 15:40:48 2009 (r37826)
@@ -46,7 +46,7 @@
/*
-=item C<STRING * Parrot_vsprintf_s>
+=item C<STRING * Parrot_vsprintf_s(PARROT_INTERP, STRING *pat, va_list args)>
Almost all the other sprintf variants in this file are implemented in
terms of this function (see C<Parrot_psprintf()> for the exception). It
@@ -71,7 +71,7 @@
/*
-=item C<STRING * Parrot_vsprintf_c>
+=item C<STRING * Parrot_vsprintf_c(PARROT_INTERP, const char *pat, va_list args)>
C string version of C<Parrot_vsprintf_s()>.
@@ -95,7 +95,8 @@
/*
-=item C<void Parrot_vsnprintf>
+=item C<void Parrot_vsnprintf(PARROT_INTERP, char *targ,
+size_t len, const char *pat, va_list args)>
Similar to C<Parrot_vsprintf()> but with an option to specify the length
(C<len>) of the returned C string.
@@ -129,7 +130,7 @@
/*
-=item C<STRING * Parrot_sprintf_s>
+=item C<STRING * Parrot_sprintf_s(PARROT_INTERP, STRING *pat, ...)>
Calls C<Parrot_vsprintf_s()> with the C<va_list> obtained from C<...>.
@@ -158,7 +159,7 @@
/*
-=item C<STRING * Parrot_sprintf_c>
+=item C<STRING * Parrot_sprintf_c(PARROT_INTERP, const char *pat, ...)>
C string version of C<Parrot_sprintf_s()>.
@@ -187,7 +188,8 @@
/*
-=item C<void Parrot_snprintf>
+=item C<void Parrot_snprintf(PARROT_INTERP, char *targ, size_t len,
+const char *pat, ...)>
Similar to C<Parrot_sprintf()> but with an option to specify the length
(C<len>) of the returned C string.
@@ -213,7 +215,7 @@
/*
-=item C<STRING * Parrot_psprintf>
+=item C<STRING * Parrot_psprintf(PARROT_INTERP, STRING *pat, PMC *ary)>
Calls C<Parrot_sprintf_format()> with the insertion arguments in an
C<Array> PMC.
@@ -237,7 +239,8 @@
/*
-=item C<int Parrot_secret_snprintf>
+=item C<int Parrot_secret_snprintf(char *buffer, const size_t len,
+const char *format, ...)>
A simulation of C<snprintf> for systems that do not support it.
Modified: trunk/src/oo.c
==============================================================================
--- trunk/src/oo.c Tue Mar 31 02:51:28 2009 (r37825)
+++ trunk/src/oo.c Tue Mar 31 15:40:48 2009 (r37826)
@@ -87,7 +87,8 @@
/*
-=item C<void Parrot_oo_extract_methods_from_namespace>
+=item C<void Parrot_oo_extract_methods_from_namespace(PARROT_INTERP, PMC *self,
+PMC *ns)>
Extract methods and vtable overrides from the given namespace and insert them
into the class.
@@ -149,7 +150,7 @@
/*
-=item C<PMC * Parrot_oo_get_namespace>
+=item C<PMC * Parrot_oo_get_namespace(PARROT_INTERP, const PMC *classobj)>
Lookup a namespace object from a class PMC.
@@ -175,7 +176,7 @@
/*
-=item C<PMC * Parrot_oo_get_class>
+=item C<PMC * Parrot_oo_get_class(PARROT_INTERP, PMC *key)>
Lookup a class object from a namespace, string, or key PMC.
@@ -250,7 +251,7 @@
/*
-=item C<PMC * Parrot_oo_get_class_str>
+=item C<PMC * Parrot_oo_get_class_str(PARROT_INTERP, STRING *name)>
Lookup a class object from a builtin string.
@@ -291,7 +292,7 @@
/*
-=item C<PMC * Parrot_oo_newclass_from_str>
+=item C<PMC * Parrot_oo_newclass_from_str(PARROT_INTERP, STRING *name)>
Create a new class object from a string name.
@@ -321,7 +322,8 @@
/*
-=item C<PMC * Parrot_oo_find_vtable_override_for_class>
+=item C<PMC * Parrot_oo_find_vtable_override_for_class(PARROT_INTERP,
+PMC *classobj, STRING *name)>
Lookup a vtable override in a specific class object.
@@ -346,7 +348,8 @@
/*
-=item C<PMC * Parrot_oo_find_vtable_override>
+=item C<PMC * Parrot_oo_find_vtable_override(PARROT_INTERP, PMC *classobj,
+STRING *name)>
Lookup a vtable override in a class, including any vtable overrides inherited
from parents.
@@ -393,7 +396,7 @@
/*
-=item C<INTVAL Parrot_get_vtable_index>
+=item C<INTVAL Parrot_get_vtable_index(PARROT_INTERP, const STRING *name)>
Return index if C<name> is a valid vtable slot name.
@@ -436,7 +439,7 @@
/*
-=item C<const char * Parrot_get_vtable_name>
+=item C<const char * Parrot_get_vtable_name(PARROT_INTERP, INTVAL idx)>
Return the method name at the specified index in the vtable slot array.
Use this function when you cannot access Parrot_vtable_slot_names directly.
@@ -468,7 +471,7 @@
/*
-=item C<const char* Parrot_MMD_method_name>
+=item C<const char* Parrot_MMD_method_name(PARROT_INTERP, INTVAL idx)>
Return the method name for the given MMD enum.
@@ -495,7 +498,7 @@
/*
-=item C<static INTVAL fail_if_type_exists>
+=item C<static INTVAL fail_if_type_exists(PARROT_INTERP, PMC *name)>
This function throws an exception if a PMC or class with the same name *
already exists in the global type registry. The global type registry
@@ -541,7 +544,7 @@
/*
-=item C<INTVAL Parrot_oo_register_type>
+=item C<INTVAL Parrot_oo_register_type(PARROT_INTERP, PMC *name, PMC *_namespace)>
This function registers a type in the global registry, first checking if it
already exists. The global type registry will go away eventually, but this
@@ -590,7 +593,7 @@
/*
-=item C<void mark_object_cache>
+=item C<void mark_object_cache(PARROT_INTERP)>
Marks all PMCs in the object method cache as live. This shouldn't strictly be
necessary, as they're likely all reachable from namespaces and classes, but
@@ -630,7 +633,7 @@
/*
-=item C<void init_object_cache>
+=item C<void init_object_cache(PARROT_INTERP)>
Allocate memory for object cache.
@@ -649,7 +652,7 @@
/*
-=item C<void destroy_object_cache>
+=item C<void destroy_object_cache(PARROT_INTERP)>
=cut
@@ -675,7 +678,7 @@
/*
-=item C<static void invalidate_type_caches>
+=item C<static void invalidate_type_caches(PARROT_INTERP, UINTVAL type)>
=cut
@@ -711,7 +714,7 @@
/*
-=item C<static void invalidate_all_caches>
+=item C<static void invalidate_all_caches(PARROT_INTERP)>
=cut
@@ -729,7 +732,7 @@
/*
-=item C<void Parrot_invalidate_method_cache>
+=item C<void Parrot_invalidate_method_cache(PARROT_INTERP, STRING *_class)>
Clear method cache for the given class. If class is NULL, caches for
all classes are invalidated.
@@ -776,7 +779,8 @@
/*
-=item C<PMC * Parrot_find_method_direct>
+=item C<PMC * Parrot_find_method_direct(PARROT_INTERP, PMC *_class,
+STRING *method_name)>
Find a method PMC for a named method, given the class PMC, current
interpreter, and name of the method. Don't use a possible method cache.
@@ -807,7 +811,8 @@
/*
-=item C<PMC * Parrot_find_method_with_cache>
+=item C<PMC * Parrot_find_method_with_cache(PARROT_INTERP, PMC *_class,
+STRING *method_name)>
Find a method PMC for a named method, given the class PMC, current
interp, and name of the method.
@@ -892,7 +897,8 @@
/*
-=item C<static void debug_trace_find_meth>
+=item C<static void debug_trace_find_meth(PARROT_INTERP, const PMC *_class,
+const STRING *name, const PMC *sub)>
=cut
@@ -945,7 +951,8 @@
/*
-=item C<static PMC * find_method_direct_1>
+=item C<static PMC * find_method_direct_1(PARROT_INTERP, PMC *_class,
+STRING *method_name)>
=cut
@@ -981,13 +988,9 @@
}
-/* ************************************************************************ */
-/* ********* BELOW HERE IS NEW PPD15 IMPLEMENTATION RELATED STUFF ********* */
-/* ************************************************************************ */
-
/*
-=item C<static PMC* C3_merge>
+=item C<static PMC* C3_merge(PARROT_INTERP, PMC *merge_list)>
=cut
@@ -1082,7 +1085,7 @@
/*
-=item C<PMC* Parrot_ComputeMRO_C3>
+=item C<PMC* Parrot_ComputeMRO_C3(PARROT_INTERP, PMC *_class)>
Computes the C3 linearization for the given class.
@@ -1148,7 +1151,8 @@
/*
-=item C<void Parrot_ComposeRole>
+=item C<void Parrot_ComposeRole(PARROT_INTERP, PMC *role, PMC *exclude,
+int got_exclude, PMC *alias, int got_alias, PMC *methods_hash, PMC *roles_list)>
Used by the Class and Object PMCs internally to compose a role into either of
them. The C<role> parameter is the role that we are composing into the class
Modified: trunk/src/sub.c
==============================================================================
--- trunk/src/sub.c Tue Mar 31 02:51:28 2009 (r37825)
+++ trunk/src/sub.c Tue Mar 31 15:40:48 2009 (r37826)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2008, Parrot Foundation.
+Copyright (C) 2001-2009, Parrot Foundation.
$Id$
=head1 NAME
@@ -29,7 +29,7 @@
/*
-=item C<void mark_context_start>
+=item C<void mark_context_start(void)>
Indicate that a new round of context marking is about to take place.
@@ -49,7 +49,7 @@
/*
-=item C<void mark_context>
+=item C<void mark_context(PARROT_INTERP, Parrot_Context* ctx)>
Marks the context C<*ctx>.
@@ -132,7 +132,7 @@
/*
-=item C<Parrot_sub * new_sub>
+=item C<Parrot_sub * new_sub(PARROT_INTERP)>
Returns a new C<Parrot_sub>.
@@ -154,7 +154,7 @@
/*
-=item C<Parrot_sub * new_closure>
+=item C<Parrot_sub * new_closure(PARROT_INTERP)>
Returns a new C<Parrot_sub> with its own scratchpad.
@@ -176,7 +176,7 @@
/*
-=item C<Parrot_cont * new_continuation>
+=item C<Parrot_cont * new_continuation(PARROT_INTERP, const Parrot_cont *to)>
Returns a new C<Parrot_cont> to the context of C<to> with its own copy of the
current interpreter context. If C<to> is C<NULL>, then the C<to_ctx> is set
@@ -214,7 +214,7 @@
/*
-=item C<Parrot_cont * new_ret_continuation>
+=item C<Parrot_cont * new_ret_continuation(PARROT_INTERP)>
Returns a new C<Parrot_cont> pointing to the current context.
@@ -242,7 +242,7 @@
/*
-=item C<Parrot_coro * new_coroutine>
+=item C<Parrot_coro * new_coroutine(PARROT_INTERP)>
Returns a new C<Parrot_coro>.
@@ -269,7 +269,7 @@
/*
-=item C<PMC * new_ret_continuation_pmc>
+=item C<PMC * new_ret_continuation_pmc(PARROT_INTERP, opcode_t *address)>
Returns a new C<RetContinuation> PMC. Uses one from the cache,
if possible; otherwise, creates a new one.
@@ -292,7 +292,7 @@
/*
-=item C<void invalidate_retc_context>
+=item C<void invalidate_retc_context(PARROT_INTERP, PMC *cont)>
Make true Continuations from all RetContinuations up the call chain.
@@ -326,7 +326,7 @@
/*
-=item C<STRING* Parrot_full_sub_name>
+=item C<STRING* Parrot_full_sub_name(PARROT_INTERP, PMC* sub_pmc)>
Return namespace, name, and location of subroutine.
@@ -394,7 +394,8 @@
/*
-=item C<int Parrot_Context_get_info>
+=item C<int Parrot_Context_get_info(PARROT_INTERP, const Parrot_Context *ctx,
+Parrot_Context_info *info)>
Takes pointers to a context and its information table.
Populates the table and returns 0 or 1. XXX needs explanation
@@ -486,7 +487,7 @@
/*
-=item C<STRING* Parrot_Context_infostr>
+=item C<STRING* Parrot_Context_infostr(PARROT_INTERP, const Parrot_Context *ctx)>
Formats context information for display. Takes a context pointer and
returns a pointer to the text. Used in debug.c and warnings.c
@@ -523,7 +524,7 @@
/*
-=item C<PMC* Parrot_find_pad>
+=item C<PMC* Parrot_find_pad(PARROT_INTERP, STRING *lex_name, const Parrot_Context *ctx)>
Locate the LexPad containing the given name. Return NULL on failure.
@@ -566,7 +567,7 @@
/*
-=item C<void Parrot_capture_lex>
+=item C<void Parrot_capture_lex(PARROT_INTERP, PMC *sub_pmc)>
Capture the current lexical environment of a sub.
@@ -638,7 +639,7 @@
/*
-=item C<PMC* parrot_new_closure>
+=item C<PMC* parrot_new_closure(PARROT_INTERP, PMC *sub_pmc)>
Used where? XXX
@@ -666,7 +667,8 @@
/*
-=item C<void Parrot_continuation_check>
+=item C<void Parrot_continuation_check(PARROT_INTERP, const PMC *pmc,
+const Parrot_cont *cc)>
Verifies that the provided continuation is sane.
@@ -696,7 +698,8 @@
/*
-=item C<void Parrot_continuation_rewind_environment>
+=item C<void Parrot_continuation_rewind_environment(PARROT_INTERP, PMC *pmc,
+Parrot_cont *cc)>
Restores the appropriate context for the continuation.
@@ -729,7 +732,7 @@
/*
-=item C<Parrot_sub * Parrot_get_sub_pmc_from_subclass>
+=item C<Parrot_sub * Parrot_get_sub_pmc_from_subclass(PARROT_INTERP, PMC *subclass)>
Gets a Parrot_sub structure from something that isn't a Sub PMC, but rather a
subclass.
Modified: trunk/src/tsq.c
==============================================================================
--- trunk/src/tsq.c Tue Mar 31 02:51:28 2009 (r37825)
+++ trunk/src/tsq.c Tue Mar 31 15:40:48 2009 (r37826)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2007, Parrot Foundation.
+Copyright (C) 2001-2009, Parrot Foundation.
$Id$
=head1 NAME
@@ -24,7 +24,7 @@
/*
-=item C<QUEUE_ENTRY * pop_entry>
+=item C<QUEUE_ENTRY * pop_entry(QUEUE *queue)>
Does a synchronized removal of the head entry off the queue and returns it.
@@ -46,7 +46,7 @@
/*
-=item C<QUEUE_ENTRY * peek_entry>
+=item C<QUEUE_ENTRY * peek_entry(const QUEUE *queue)>
This does no locking, so the result might have changed by the time you
get the entry, but a synchronized C<pop_entry()> will check again and
@@ -67,7 +67,7 @@
/*
-=item C<QUEUE_ENTRY * nosync_pop_entry>
+=item C<QUEUE_ENTRY * nosync_pop_entry(QUEUE *queue)>
Grab an entry off the queue with no synchronization. Internal only,
because it's darned evil and shouldn't be used outside the module. It's
@@ -100,7 +100,7 @@
/*
-=item C<QUEUE_ENTRY * wait_for_entry>
+=item C<QUEUE_ENTRY * wait_for_entry(QUEUE *queue)>
Does a synchronized removal of the head entry off the queue, waiting if
necessary until there is an entry, and then returns it.
@@ -128,7 +128,7 @@
/*
-=item C<void push_entry>
+=item C<void push_entry(QUEUE *queue, QUEUE_ENTRY *entry)>
Does a synchronized insertion of C<entry> onto the tail of the queue.
@@ -156,7 +156,7 @@
/*
-=item C<void unshift_entry>
+=item C<void unshift_entry(QUEUE *queue, QUEUE_ENTRY *entry)>
Does a synchronized insertion of C<entry> into the head of the queue.
@@ -187,7 +187,7 @@
/*
-=item C<void nosync_insert_entry>
+=item C<void nosync_insert_entry(QUEUE *queue, QUEUE_ENTRY *entry)>
Inserts a timed event according to C<abstime>. The caller has to hold the
queue mutex.
@@ -240,7 +240,7 @@
/*
-=item C<void insert_entry>
+=item C<void insert_entry(QUEUE *queue, QUEUE_ENTRY *entry)>
Does a synchronized insert of C<entry>.
@@ -260,7 +260,7 @@
/*
-=item C<void queue_lock>
+=item C<void queue_lock(QUEUE *queue)>
Locks the queue's mutex.
@@ -277,7 +277,7 @@
/*
-=item C<void queue_unlock>
+=item C<void queue_unlock(QUEUE *queue)>
Unlocks the queue's mutex.
@@ -294,7 +294,7 @@
/*
-=item C<void queue_broadcast>
+=item C<void queue_broadcast(QUEUE *queue)>
This function wakes up I<every> thread waiting on the queue.
@@ -311,7 +311,7 @@
/*
-=item C<void queue_signal>
+=item C<void queue_signal(QUEUE *queue)>
=cut
@@ -326,7 +326,7 @@
/*
-=item C<void queue_wait>
+=item C<void queue_wait(QUEUE *queue)>
Instructs the queue to wait.
@@ -343,7 +343,7 @@
/*
-=item C<void queue_timedwait>
+=item C<void queue_timedwait(QUEUE *queue, const struct timespec *abs_time)>
Instructs the queue to wait for C<abs_time> seconds (?).
@@ -360,7 +360,7 @@
/*
-=item C<QUEUE* queue_init>
+=item C<QUEUE* queue_init(UINTVAL prio)>
Initializes the queue, setting C<prio> as the queue's priority.
@@ -385,7 +385,7 @@
/*
-=item C<void queue_destroy>
+=item C<void queue_destroy(QUEUE *queue)>
Destroys the queue, raising an exception if it is not empty.
Modified: trunk/t/codingstd/c_function_docs.t
==============================================================================
--- trunk/t/codingstd/c_function_docs.t Tue Mar 31 02:51:28 2009 (r37825)
+++ trunk/t/codingstd/c_function_docs.t Tue Mar 31 15:40:48 2009 (r37826)
@@ -181,7 +181,6 @@
src/jit/alpha/jit_emit.h
src/jit/arm/jit_emit.h
-src/debug.c
src/dynext.c
src/events.c
src/exceptions.c
@@ -195,7 +194,6 @@
src/key.c
src/list.c
src/malloc-trace.c
-src/misc.c
src/nci_test.c
src/oo.c
src/packdump.c
@@ -212,13 +210,12 @@
src/pmc_freeze.c
src/spf_render.c
src/spf_vtable.c
-src/sub.c
src/thread.c
-src/tsq.c
src/utils.c
# Needs docs written. Boilerplate in place.
src/datatypes.c
+src/debug.c
src/gc/generational_ms.c
src/io/io_string.c
src/io/socket_api.c
@@ -229,6 +226,7 @@
src/string/charset/binary.c
src/string/charset/iso-8859-1.c
src/string/charset/unicode.c
+src/tsq.c
# Local Variables:
More information about the parrot-commits
mailing list