One more item off todo/release for today. This patch changes
my $tid_obj = APR::OS::thread_current();
my $tid = $$tid_obj;
to
my $tid = APR::OS::current_thread_id();
--
--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5
Index: Changes
===================================================================
RCS file: /home/cvs/modperl-2.0/Changes,v
retrieving revision 1.495
diff -u -I$Id -r1.495 Changes
--- Changes 22 Sep 2004 01:29:31 -0000 1.495
+++ Changes 22 Sep 2004 21:45:54 -0000
@@ -12,6 +12,10 @@
=item 1.99_17-dev
+APR::OS::thread_current renamed APR::OS::current_thread_id and
+it now returns the actual thread_id instead of an object that
+needed to be dereferenced to get at the thread_id [Gozer]
+
change a bunch of the APR:: constants to have a better prefix
(APR::FILETYPE_* and APR::FILEPROT_). libapr will be changed soon too
[Stas]
Index: t/response/TestAPR/os.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/os.pm,v
retrieving revision 1.4
diff -u -I$Id -r1.4 os.pm
--- t/response/TestAPR/os.pm 1 Dec 2003 17:28:36 -0000 1.4
+++ t/response/TestAPR/os.pm 22 Sep 2004 21:45:54 -0000
@@ -14,16 +14,14 @@
sub handler {
my $r = shift;
- plan $r, tests => 2;
+ plan $r, tests => 1;
if (Apache::MPM->is_threaded) {
- my $id = APR::OS::thread_current();
- ok t_cmp("$id", "$id", "current thread");
- ok t_cmp($$id, $$id, "current thread");
+ my $id = APR::OS::current_thread_id();
+ ok t_cmp($id, $id, "current thread($id/$$)");
}
else {
ok t_cmp($$, $$, "current process id");
- ok 1;
}
Apache::OK;
Index: todo/release
===================================================================
RCS file: /home/cvs/modperl-2.0/todo/release,v
retrieving revision 1.62
diff -u -I$Id -r1.62 release
--- todo/release 22 Sep 2004 01:37:02 -0000 1.62
+++ todo/release 22 Sep 2004 21:45:54 -0000
@@ -4,14 +4,6 @@
-- see also todo/api_status
-* why APR::OS::thread_current returns an object and to get the tid,
- you need to dereference it? that doesn't sounds too
- intuitive.
- - change it to return the id right away?
- - rename it to be current_thread_id
- - update docs
- owner: gozer
-
* $r->log_reason:
just add to compat
owner: stas
Index: xs/APR/OS/APR__OS.h
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/APR/OS/APR__OS.h,v
retrieving revision 1.3
diff -u -I$Id -r1.3 APR__OS.h
--- xs/APR/OS/APR__OS.h 4 Mar 2004 06:01:09 -0000 1.3
+++ xs/APR/OS/APR__OS.h 22 Sep 2004 21:45:54 -0000
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-static MP_INLINE apr_os_thread_t mpxs_apr_os_thread_current(pTHX)
+static MP_INLINE U32 mpxs_APR__OS_current_thread_id(pTHX)
{
#if APR_HAS_THREADS
return apr_os_thread_current();
Index: xs/maps/apr_functions.map
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/maps/apr_functions.map,v
retrieving revision 1.86
diff -u -I$Id -r1.86 apr_functions.map
--- xs/maps/apr_functions.map 8 Sep 2004 00:42:02 -0000 1.86
+++ xs/maps/apr_functions.map 22 Sep 2004 21:45:54 -0000
@@ -613,6 +613,7 @@
apr_xlate_open
MODULE=APR::OS
+ mpxs_APR__OS_current_thread_id
-apr_os_dir_get
-apr_os_exp_time_get
-apr_os_file_get
@@ -630,7 +631,6 @@
-apr_os_threadkey_put
-apr_os_dso_handle_get
-apr_os_dso_handle_put
- apr_os_thread_current | mpxs_
-apr_os_thread_equal
-apr_os_global_mutex_get
-apr_os_proc_mutex_get
Index: xs/maps/apr_types.map
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/maps/apr_types.map,v
retrieving revision 1.22
diff -u -I$Id -r1.22 apr_types.map
--- xs/maps/apr_types.map 21 May 2004 19:25:46 -0000 1.22
+++ xs/maps/apr_types.map 22 Sep 2004 21:45:54 -0000
@@ -95,7 +95,7 @@
#thread stuff
struct apr_threadkey_t | UNDEFINED
struct apr_os_threadkey_t | UNDEFINED
-typedef apr_os_thread_t | APR::OS::Thread
+typedef apr_os_thread_t | UNDEFINED
struct apr_thread_t | UNDEFINED
apr_thread_start_t | UNDEFINED
struct apr_threadattr_t | UNDEFINED
Index: xs/tables/current/ModPerl/FunctionTable.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm,v
retrieving revision 1.184
diff -u -I$Id -r1.184 FunctionTable.pm
--- xs/tables/current/ModPerl/FunctionTable.pm 21 Sep 2004 05:42:44 -0000 1.184
+++ xs/tables/current/ModPerl/FunctionTable.pm 22 Sep 2004 21:45:54 -0000
@@ -2,7 +2,7 @@
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# ! WARNING: generated by ModPerl::ParseSource/0.010
-# ! Thu Sep 16 16:51:25 2004
+# ! Wed Sep 22 14:01:12 2004
# ! do NOT edit, any changes will be lost !
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -5499,6 +5499,20 @@
]
},
{
+ 'return_type' => 'unsigned long',
+ 'name' => 'mpxs_APR__OS_current_thread_id',
+ 'attr' => [
+ 'static',
+ '__inline__'
+ ],
+ 'args' => [
+ {
+ 'type' => 'PerlInterpreter *',
+ 'name' => 'my_perl'
+ }
+ ]
+ },
+ {
'return_type' => 'void',
'name' => 'mpxs_APR__Pool_clear',
'attr' => [
@@ -7302,20 +7316,6 @@
{
'type' => 'const char *',
'name' => 'mask_or_numbits'
- }
- ]
- },
- {
- 'return_type' => 'apr_os_thread_t',
- 'name' => 'mpxs_apr_os_thread_current',
- 'attr' => [
- 'static',
- '__inline__'
- ],
- 'args' => [
- {
- 'type' => 'PerlInterpreter *',
- 'name' => 'my_perl'
}
]
},
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]