Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
c8841c43
Commit
c8841c43
authored
Jun 11, 1996
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Got rid of florida hack and made it work with Solaris 2.5 pthreads.
Wonder if this will break it on all other platforms :-)
parent
1f0cf939
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
19 deletions
+7
-19
Python/thread_pthread.h
Python/thread_pthread.h
+7
-19
No files found.
Python/thread_pthread.h
View file @
c8841c43
...
...
@@ -22,23 +22,14 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
#ifdef sun
#define FLORIDA_HACKS
#endif
#ifdef FLORIDA_HACKS
/* Hacks for Florida State Posix threads implementation */
#undef _POSIX_THREADS
#include "/ufs/guido/src/python/Contrib/pthreads/src/pthread.h"
/* Posix threads interface */
#include <stdlib.h>
#include <pthread.h>
#define pthread_attr_default ((pthread_attr_t *)0)
#define pthread_mutexattr_default ((pthread_mutexattr_t *)0)
#define pthread_condattr_default ((pthread_condattr_t *)0)
#define TRYLOCK_OFFSET 1
#else
/* !FLORIDA_HACKS */
#include <pthread.h>
#define TRYLOCK_OFFSET 0
#endif
/* FLORIDA_HACKS */
#include <stdlib.h>
/* A pthread mutex isn't sufficient to model the Python lock type
* because, according to Draft 5 of the docs (P1003.4a/D5), both of the
...
...
@@ -78,16 +69,13 @@ static void _init_thread _P0()
int
start_new_thread
_P2
(
func
,
void
(
*
func
)
_P
((
void
*
)),
arg
,
void
*
arg
)
{
#if defined(SGI_THREADS) && defined(USE_DL)
long
addr
,
size
;
static
int
local_initialized
=
0
;
#endif
/* SGI_THREADS and USE_DL */
pthread_t
th
;
int
success
;
dprintf
((
"start_new_thread called
\n
"
));
if
(
!
initialized
)
init_thread
();
success
=
pthread_create
(
&
th
,
pthread_attr_default
,
func
,
arg
);
success
=
pthread_create
(
&
th
,
pthread_attr_default
,
(
void
*
(
*
)
_P
((
void
*
)))
func
,
arg
);
return
success
<
0
?
0
:
1
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment