| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We want to use C11 thread local storage where possible, as its read overhead
is lower. However C++ uses incompatible syntax for TLS, so we have to hide
the variable from C++ extensions, and have the read code "fall back" to the
pthread_getspecific() approach.
However, C++ extensions also need to be able to call PERL_SET_CONTEXT(t) and
have everything still work the same as C extensions. Hence they *also* need
to set PL_current_context - a variable that has to be hidden from them.
Hence change the version of the PERL_SET_CONTEXT macro used by C++
extensions from inline code to a call to Perl_set_context(), and have that
set PL_current_context (when used).
Technically this commit also fixes a bug in that Perl_set_context() is API
and should have been setting PL_current_context since that variable was
first introduced. In practice, likely nothing uses this API, as there is no
code on CPAN that calls it, and the macro PERL_SET_CONTEXT() is much more
prominent.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Configure probes the C compiler to find out whether it supports C11 thread
local storage, and if found uses this for PERL_SET_CONTEXT/PERL_GET_CONTEXT,
in preference to the pthread_setspecific()/pthread_getspecific() approach.
However, we can come unstuck with XS extensions written in C++, as C++ and C
disagree on the syntax used for thread local storage, meaning that the
working token that Configure probed for C turns out to be a compiler error
on C++.
As Configure doesn't have a way to probe for C++ dialects, we just take the
safe option and do the same as 5.34.0 and earlier - use pthreads on C++.
This commit is minimal because the implementation of PERL_SET_CONTEXT for
C11 thread local storage was already defensively written to *also* call
pthread_setspecific().
|
|
|
|
|
|
| |
DJGPP is a port of the GNU toolchain to 32-bit x86 systems running DOS.
The last known attempt to build Perl on it was on 5.20, which only got
as far as building miniperl.
|
|
|
|
| |
The build has been broken since 2009.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Declare and use a variable PL_current_context to store a pointer to the
thread's interpreter struct. Use this to implement implicit context undef
ITHREADS, instead of a call to posix_getspecific().
For normal threaded code, this will eliminate function calls. For threaded
code in shared objects (the typical configuration for Linux distribution
builds) there still needs to be a function call to get the pointer to
thread local variables, but there will only be one per function, not one
per read of the variable.
|
|
|
|
|
|
|
|
|
|
|
| |
This just detabifies to get rid of the mixed tab/space indentation.
Applying consistent indentation and dealing with other tabs are another issue.
Done with `expand -i`.
* vutil.* left alone, it's part of version.
* Left regen managed files alone for now.
|
|
|
|
|
|
|
| |
These mutexes rely on a counter being accurate to work. If for some
reason that I can't imagine happening, the count goes below 0, this
commit resets it to zero, which may be enough to cause the program to
continue.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and fix the mixed up pointer vs non-pointer use of the mutex
argument.
Without the parentheses (or without the new tests in the previous
commit) for code like;
PERL_WRITE_LOCK(&PL_some_mutex);
the MUTEX_LOCK(mutex.lock) in that code would expand to:
MUTEX_LOCK(&PL_some_mutex.lock);
and happen to work, even though the next line has:
if ((mutex)->readers_count)
treating the mutex parameter as a pointer.
With the parentheses the MUTEX_LOCK(mutex.lock) becomes:
MUTEX_LOCK((&PL_some_mutex).lock);
which as expected fails to compile in a similar way to the pointer
test code in the previous commit.
|
|
|
|
| |
This fails to compile
|
|
|
|
|
| |
The old name did not encompass all the possible reasons for the
mutex signal condition to be invoked
|
|
|
|
|
| |
The mutex is locked, and any contenders are awaiting a signal, which
until this commit was missing.
|
|
|
|
| |
These were missed in 5640a370e8b19af74b8ca0b4694464c21a87916b.
|
|
|
|
|
| |
The API for other mutexes passes the address of the lock, instead of the
lock itself. It is less confusing to have the APIs be the same.
|
|
|
|
|
|
| |
The mutex macros already in perl are sufficient to allow us to emulate
this type of locking, which may also be available natively, but I don't
think it is worth the effort to use the native calls.
|
|
|
|
| |
Only THREAD_RET_TYPE is still used.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
http://clang.llvm.org/docs/ThreadSafetyAnalysis.html
Static (compile-time) annotations for declaring the multithreaded
behavior of functions, variables, and capabilities (like mutexes).
Available since about clang 3.5.
./Configure -des -Dusedevel -Dusethreads -Dcc=clang -Accflags='-Wthread-safety'
clang -Wthread-safety then checks the validity of the annotations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An empty cpan/.dir-locals.el stops Emacs using the core defaults for
code imported from CPAN.
Committer's work:
To keep t/porting/cmp_version.t and t/porting/utils.t happy, $VERSION needed
to be incremented in many files, including throughout dist/PathTools.
perldelta entry for module updates.
Add two Emacs control files to MANIFEST; re-sort MANIFEST.
For: RT #124119.
|
|
|
|
|
|
|
| |
(1) Enhance its description.
(2) Simplify it: define only if has warn_unused_result.
(3) Make it use STMT_START { ... } STMT_END to be less GNU-extensiony.
(4) Redo 04783dc7 ("fix 'ignoring return value' compiler warnings") with it.
|
|
|
|
|
|
|
|
|
|
|
| |
Various system functions like write() are marked with the
__warn_unused_result__ attribute, which causes an 'ignoring return value'
warning to be emitted, even if the function call result is cast to (void).
The generic solution seems to be
int rc = write(...);
PERL_UNUSED_VAR(rc);
|
|
|
|
|
|
|
| |
Actually, most of this commit is adding (void) to various function returns
where we know its ok to ignore the return value. This doesn't actually
silence the -Wunused-result warning (thanks a bundle gcc), but at least
it marks our intentions.
|
|
|
|
|
| |
DG/UX was a Unix sold by Data General. The last release was in April 2001.
It only runs on Data General's own hardware.
|
|
|
|
|
| |
VM/ESA was a mainframe OS. IBM ended service on it in June 2003. It was
superseded by Z/VM.
|
|
|
|
|
| |
This updates the editor hints in our files for Emacs and vim to request
that tabs be inserted as spaces.
|
| |
|
| |
|
|
|
| |
p4raw-id: //depot/perl@34608
|
|
|
| |
p4raw-id: //depot/perl@32793
|
|
|
|
|
| |
Message-ID: <20060416043253.GA3438@petdance.com>
p4raw-id: //depot/perl@27834
|
|
|
|
|
|
| |
From: "John E. Malmberg" <wb8tyw@qsl.net>
Message-id: <441ADE4D.2090207@qsl.net>
p4raw-id: //depot/perl@27563
|
|
|
|
|
| |
did not update)
p4raw-id: //depot/perl@26732
|
|
|
| |
p4raw-id: //depot/perl@26652
|
|
|
| |
p4raw-id: //depot/perl@26647
|
|
|
| |
p4raw-id: //depot/perl@24106
|
|
|
|
|
| |
Message-ID: <lracroz1gg.fsf@caliper.activestate.com>
p4raw-id: //depot/perl@23749
|
|
|
| |
p4raw-id: //depot/perl@22509
|
|
|
| |
p4raw-id: //depot/perl@22417
|
|
|
|
|
|
| |
both the forms, pthread_mutexattr_settype() and
pthread_mutexattr_setkind_np(), exist on z/OS.
p4raw-id: //depot/perl@19767
|
|
|
|
|
| |
apparently now it works!
p4raw-id: //depot/perl@19368
|
|
|
|
|
| |
<PRADINE@uk.ibm.com>.
p4raw-id: //depot/perl@19306
|
|
|
|
|
|
|
| |
(Lots of Perl 5 source code archaeology was involved.)
Larry didn't make strangled noises when I showed him
the patch, either :-)
p4raw-id: //depot/perl@19242
|
|
|
| |
p4raw-id: //depot/perl@18807
|
|
|
| |
p4raw-id: //depot/perl@18801
|
|
|
|
|
|
| |
Subject: [PATCH] $0 modifying
Message-ID: <20021130181651.GA5876@kosh.hut.fi>
p4raw-id: //depot/perl@18229
|
|
|
|
|
| |
Still imcomplete. Configure will follow
p4raw-id: //depot/perl@18030
|
|
|
|
|
| |
Sat, 5 Oct 2002; Jarkko Hietaniemi <jhi@iki.fi>
p4raw-id: //depot/perl@17983
|
|
|
| |
p4raw-id: //depot/perl@15151
|
|
|
|
|
|
| |
be found in the repository, which is most often not right,
but at least consistent)
p4raw-id: //depot/perl@14400
|
|
|
|
|
|
| |
Thanks to H. Merijn Brand for the patch.
Some of the comments and or guards might be removable in perl.h now.
p4raw-id: //depot/perl@11758
|