summaryrefslogtreecommitdiffstats
path: root/Python/thread.c
diff options
context:
space:
mode:
authorSjoerd Mullender <sjoerd@acm.org>1993-01-13 12:49:46 (GMT)
committerSjoerd Mullender <sjoerd@acm.org>1993-01-13 12:49:46 (GMT)
commit76ab5feb45619f7a20c1a1ecd1ebfb50efb6f8c9 (patch)
treeee6d48613afc9b75f67bf1082a9a4292b473dfb1 /Python/thread.c
parent7b741767621f57aa068186cd03733d166858fe1d (diff)
downloadcpython-76ab5feb45619f7a20c1a1ecd1ebfb50efb6f8c9.zip
cpython-76ab5feb45619f7a20c1a1ecd1ebfb50efb6f8c9.tar.gz
cpython-76ab5feb45619f7a20c1a1ecd1ebfb50efb6f8c9.tar.bz2
ushdr_t was not defined so fill in its size instead of using sizeof.
Diffstat (limited to 'Python/thread.c')
-rw-r--r--Python/thread.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/thread.c b/Python/thread.c
index 1f2ae9d..44f2896 100644
--- a/Python/thread.c
+++ b/Python/thread.c
@@ -16,6 +16,7 @@ static int thread_debug = 0;
#include <ulocks.h>
#include <errno.h>
+#define HDR_SIZE 2680 /* sizeof(ushdr_t) */
#define MAXPROC 100 /* max # of threads that can be started */
static usptr_t *shared_arena;
@@ -121,7 +122,7 @@ void init_thread _P0()
perror("usconfig - CONF_INITSIZE (check)");
if (usconfig(CONF_INITSIZE, size) < 0)
perror("usconfig - CONF_INITSIZE (reset)");
- addr = (long) dl_getrange(size + sizeof(ushdr_t));
+ addr = (long) dl_getrange(size + HDR_SIZE);
dprintf(("trying to use addr %lx-%lx for shared arena\n", addr, addr+size));
errno = 0;
if ((addr = usconfig(CONF_ATTACHADDR, addr)) < 0 && errno != 0)
@@ -194,7 +195,7 @@ int start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg)
perror("usconfig - CONF_INITSIZE (check)");
if (usconfig(CONF_INITSIZE, size) < 0)
perror("usconfig - CONF_INITSIZE (reset)");
- addr = (long) dl_getrange(size + sizeof(ushdr_t));
+ addr = (long) dl_getrange(size + HDR_SIZE);
dprintf(("trying to use addr %lx-%lx for sproc\n", addr, addr+size));
errno = 0;
if ((addr = usconfig(CONF_ATTACHADDR, addr)) < 0 && errno != 0)