#endif
#ifndef AFS_ARM_LINUX20_ENV
-#if defined(AFS_OSF_ENV) || defined(AFS_S390_LINUX20_ENV)
+#if defined(AFS_S390_LINUX20_ENV)
int PRE_Block; /* Remnants of preemption support. */
#else
char PRE_Block; /* Remnants of preemption support. */
#define MAXINT (~(1<<((sizeof(int)*8)-1)))
#define MINSTACK 44
-#if defined(__hp9000s800) || defined(AFS_PARISC_LINUX24_ENV)
+#if defined(__hp9000s800)
#define MINFRAME 128
#define STACK_ALIGN 8
#else
if ((stackmemory = malloc(stacksize + 7)) == NULL)
#endif /* !AFS_DARWIN_ENV */
{
+ free(temp);
Set_LWP_RC();
return LWP_ENOMEM;
}
#endif /* !AFS_DARWIN_ENV */
#endif
if (priority < 0 || priority >= MAX_PRIORITIES) {
+ free(temp);
+#ifndef AFS_AIX32_ENV
+ free(stackmemory);
+#endif
Set_LWP_RC();
return LWP_EBADPRI;
}
PRE_Block = 1;
#endif
lwp_cpptr = temp;
-#if defined(AFS_PARISC_LINUX24_ENV)
- savecontext(Create_Process_Part2, &temp2->context,
- stackptr + MINFRAME);
-#else
#ifdef __hp9000s800
savecontext(Create_Process_Part2, &temp2->context,
stackptr + MINFRAME);
#endif /* AFS_SPARC64_LINUX20_ENV || AFS_SPARC_LINUX20_ENV */
#endif /* AFS_SGI62_ENV */
#endif
-#endif
/* End of gross hack */
Set_LWP_RC();
pid->status = DESTROYED;
move(pid, &runnable[pid->priority], &blocked);
temp = lwp_cpptr;
-#if defined(__hp9000s800) || defined(AFS_PARISC_LINUX24_ENV)
+#if defined(__hp9000s800)
savecontext(Dispatcher, &(temp->context),
&(LWPANCHOR.dsptchstack[MINFRAME]));
#elif defined(AFS_SGI62_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
* the guard word at the front of the stack being damaged and
* for the stack pointer being below the front of the stack.
* WARNING! This code assumes that stacks grow downward. */
-#if defined(__hp9000s800) || defined(AFS_PARISC_LINUX24_ENV)
+#if defined(__hp9000s800)
/* Fix this (stackcheck at other end of stack?) */
if (lwp_cpptr != NULL && lwp_cpptr->stack != NULL
&& (lwp_cpptr->stackcheck !=
#endif
printf("stackcheck = %u: stack = %u \n", lwp_cpptr->stackcheck,
*(int *)lwp_cpptr->stack);
- printf("topstack = 0x%" AFS_PTR_FMT ": stackptr = 0x%" AFS_PTR_FMT ": stacksize = 0x%x\n",
+ printf("topstack = %p: stackptr = %p: stacksize = 0x%x\n",
(void *)(uintptr_t)lwp_cpptr->context.topstack,
(void *)(uintptr_t)lwp_cpptr->stack,
lwp_cpptr->stacksize);
temp->index = lwp_nextindex++;
temp->stack = stack;
temp->stacksize = stacksize;
-#if defined(__hp9000s800) || defined(AFS_PARISC_LINUX24_ENV)
+#if defined(__hp9000s800)
if (temp->stack != NULL)
temp->stackcheck = *(int *)((temp->stack) + stacksize - 4);
#else
for (i = 0; i < stacksize; i++)
stackptr[i] = i & 0xff;
else
-#if defined(__hp9000s800) || defined(AFS_PARISC_LINUX24_ENV)
+#if defined(__hp9000s800)
*(afs_int32 *) (stackptr + stacksize - 4) = STACKMAGIC;
#else
*(afs_int32 *) stackptr = STACKMAGIC;
{
int i;
-#if defined(__hp9000s800) || defined(AFS_PARISC_LINUX24_ENV)
+#if defined(__hp9000s800)
if (*(afs_int32 *) (stackptr + stacksize - 4) == STACKMAGIC)
return 0;
else {