Revision history for Perl extension threads.
+1.26 Mon May 8 13:18:29 EDT 2006
+ - Fix for Win32 build WRT page size
+
1.25 Thu May 4 12:34:02 EDT 2006
- Final sync with blead
- Lock counters in tests
use strict;
use warnings;
-our $VERSION = '1.25';
+our $VERSION = '1.26';
my $XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
=head1 VERSION
-This document describes threads version 1.25
+This document describes threads version 1.26
=head1 SYNOPSIS
L<http://www.cpanforum.com/dist/threads>
Annotated POD for L<threads>:
-L<http://annocpan.org/~JDHEDDEN/threads-1.25/shared.pm>
+L<http://annocpan.org/~JDHEDDEN/threads-1.26/shared.pm>
L<threads::shared>, L<perlthrtut>
# define PERL_THREAD_DETACH(t) pthread_detach((t))
# endif
#endif
+#if !defined(HAS_GETPAGESIZE) && defined(I_SYS_PARAM)
+# include <sys/param.h>
+#endif
/* Values for 'state' member */
#define PERL_ITHR_JOINABLE 0
/* Round up to page size boundary */
if (page_size <= 0) {
-#ifdef PL_mmap_page_size
- page_size = PL_mmap_page_size;
-#else
-# ifdef HAS_MMAP
-# if defined(HAS_SYSCONF) && (defined(_SC_PAGESIZE) || defined(_SC_MMAP_PAGE_SIZE))
+#if defined(HAS_SYSCONF) && (defined(_SC_PAGESIZE) || defined(_SC_MMAP_PAGE_SIZE))
SETERRNO(0, SS_NORMAL);
-# ifdef _SC_PAGESIZE
+# ifdef _SC_PAGESIZE
page_size = sysconf(_SC_PAGESIZE);
-# else
+# else
page_size = sysconf(_SC_MMAP_PAGE_SIZE);
-# endif
+# endif
if ((long)page_size < 0) {
if (errno) {
SV * const error = get_sv("@", FALSE);
Perl_croak(aTHX_ "PANIC: sysconf: pagesize unknown");
}
}
-# else
-# ifdef HAS_GETPAGESIZE
+#else
+# ifdef HAS_GETPAGESIZE
page_size = getpagesize();
-# else
-# if defined(I_SYS_PARAM) && defined(PAGESIZE)
- page_size = PAGESIZE;
-# endif
-# endif
- if (page_size <= 0)
- Perl_croak(aTHX_ "PANIC: bad pagesize %" IVdf, (IV)page_size);
-# endif
# else
+# if defined(I_SYS_PARAM) && defined(PAGESIZE)
+ page_size = PAGESIZE;
+# else
page_size = 8192; /* A conservative default */
+# endif
# endif
+ if (page_size <= 0)
+ Perl_croak(aTHX_ "PANIC: bad pagesize %" IVdf, (IV)page_size);
#endif
}
stack_size = ((stack_size + (page_size - 1)) / page_size) * page_size;