[svn:parrot] r48583 - in trunk: . config/gen/platform/ansi config/gen/platform/generic config/gen/platform/win32 src/pmc
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Fri Aug 20 13:08:13 UTC 2010
Author: NotFound
Date: Fri Aug 20 13:08:12 2010
New Revision: 48583
URL: https://trac.parrot.org/parrot/changeset/48583
Log:
add a pid.c for win32 platform and fix some other mistakes from r48580, TT #1564
Added:
trunk/config/gen/platform/win32/pid.c (contents, props changed)
Modified:
trunk/MANIFEST
trunk/config/gen/platform/ansi/pid.c (contents, props changed)
trunk/config/gen/platform/generic/pid.c (contents, props changed)
trunk/src/pmc/parrotinterpreter.pmc
Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST Fri Aug 20 12:55:08 2010 (r48582)
+++ trunk/MANIFEST Fri Aug 20 13:08:12 2010 (r48583)
@@ -1,6 +1,8 @@
# ex: set ro:
# $Id$
#
+# generated by tools/dev/mk_manifest_and_skip.pl Fri Aug 20 12:55:40 2010 UT
+#
# See below for documentation on the format of this file.
#
# See docs/submissions.pod and the documentation in
@@ -313,6 +315,7 @@
config/gen/platform/win32/io.h []
config/gen/platform/win32/misc.c []
config/gen/platform/win32/misc.h []
+config/gen/platform/win32/pid.c []
config/gen/platform/win32/signal.c []
config/gen/platform/win32/signal.h []
config/gen/platform/win32/stat.c []
Modified: trunk/config/gen/platform/ansi/pid.c
==============================================================================
--- trunk/config/gen/platform/ansi/pid.c Fri Aug 20 12:55:08 2010 (r48582)
+++ trunk/config/gen/platform/ansi/pid.c Fri Aug 20 13:08:12 2010 (r48583)
@@ -1,4 +1,4 @@
-/* $Id: $
+/* $Id$
* Copyright (C) 2010, Parrot Foundation.
*/
@@ -18,7 +18,7 @@
=cut
-=item C<INTVAL Parrot_getpid(void)>
+=item C<UINTVAL Parrot_getpid(void)>
Parrot wrapper around standard library C<getpid()> function, returning an UINTVAL.
Modified: trunk/config/gen/platform/generic/pid.c
==============================================================================
--- trunk/config/gen/platform/generic/pid.c Fri Aug 20 12:55:08 2010 (r48582)
+++ trunk/config/gen/platform/generic/pid.c Fri Aug 20 13:08:12 2010 (r48583)
@@ -1,4 +1,4 @@
-/* $Id: $
+/* $Id$
* Copyright (C) 2010, Parrot Foundation.
*/
@@ -25,7 +25,7 @@
/*
-=item C<INTVAL Parrot_getpid(void)>
+=item C<UINTVAL Parrot_getpid(void)>
Parrot wrapper around standard library C<getpid()> function, returning an UINTVAL.
Added: trunk/config/gen/platform/win32/pid.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/config/gen/platform/win32/pid.c Fri Aug 20 13:08:12 2010 (r48583)
@@ -0,0 +1,50 @@
+/* $Id$
+ * Copyright (C) 2010, Parrot Foundation.
+ */
+
+/*
+
+=head1 NAME
+
+config/gen/platform/win32/pid.c
+
+=head1 DESCRIPTION
+
+Parrot process id functions.
+
+=head2 Functions
+
+=over 4
+
+=cut
+
+=item C<UINTVAL Parrot_getpid(void)>
+
+Parrot wrapper around standard library C<getpid()> function, returning an UINTVAL.
+
+=cut
+
+*/
+
+UINTVAL
+Parrot_getpid(void)
+{
+ Parrot_warn(NULL, PARROT_WARNINGS_PLATFORM_FLAG, "Parrot_getpid unuseful in this platform");
+ return 0;
+}
+
+
+/*
+
+=back
+
+=cut
+
+*/
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Modified: trunk/src/pmc/parrotinterpreter.pmc
==============================================================================
--- trunk/src/pmc/parrotinterpreter.pmc Fri Aug 20 12:55:08 2010 (r48582)
+++ trunk/src/pmc/parrotinterpreter.pmc Fri Aug 20 13:08:12 2010 (r48583)
@@ -848,9 +848,22 @@
RETURN(PMC *handle);
}
+/*
+
+=item METHOD getpid()
+
+Returns the pid of the current process, 0 in platforms that doesn't
+support it.
+
+This method is experimental. See TT #1564.
+
+=cut
+
+*/
+
METHOD getpid() {
INTVAL id = Parrot_getpid();
- RETURN(INTVAL id);
+ RETURN(INTVAL id);
}
}
More information about the parrot-commits
mailing list