savecontext(Create_Process_Part2, &temp2->context,
stackptr+stacksize-16); /* 16 = 2 * jmp_buf_type*/
#else
+#if defined(AFS_SPARC64_LINUX20_ENV) || defined(AFS_SPARC_LINUX20_ENV)
+ savecontext(Create_Process_Part2, &temp2->context,
+ stackptr+stacksize-0x40); /* lomgjmp does something
+ with %fp + 0x38 */
+#else
savecontext(Create_Process_Part2, &temp2->context,
stackptr+stacksize-sizeof(void *));
#endif
#endif
+#endif
/* End of gross hack */
Set_LWP_RC();
return LWP_EINIT;
}
+PROCESS LWP_ThreadId()
+{
+ Debug(0, ("Entered ThreadId"))
+ if (lwp_init)
+ return lwp_cpptr;
+ else
+ return (PROCESS) 0;
+}
+
#define LWPANCHOR (*lwp_init)
int LWP_DestroyProcess(pid) /* destroy a lightweight process */
savecontext(Dispatcher, &(temp -> context),
&(LWPANCHOR.dsptchstack[(sizeof LWPANCHOR.dsptchstack)-8]));
#else
+#if defined(AFS_SPARC64_LINUX20_ENV) || defined(AFS_SPARC_LINUX20_ENV)
+ savecontext(Dispatcher, &(temp -> context),
+ &(LWPANCHOR.dsptchstack[(sizeof LWPANCHOR.dsptchstack)-0x40]));
+#else
savecontext(Dispatcher, &(temp -> context),
&(LWPANCHOR.dsptchstack[(sizeof LWPANCHOR.dsptchstack)-sizeof(void *)]));
#endif
#endif
+#endif
}
return LWP_SUCCESS;
} else
temp -> misc = NULL; /* currently unused */
temp -> next = NULL;
temp -> prev = NULL;
- temp -> lwp_rused = NULL;
+ temp -> lwp_rused = 0;
temp -> level = 1; /* non-preemptable */
}