diff options
author | julian <julian@FreeBSD.org> | 1996-01-22 00:02:33 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1996-01-22 00:02:33 +0000 |
commit | 619b731f5bb5e09dcf1eaf1fbd96383ca64398fd (patch) | |
tree | a89c7f50ec371cef4418259b9dccdd31ebb2f61f /lib/csu/i386 | |
parent | 663b14fb2f3198fb0bfb62ae16b6b56c2a4dd055 (diff) | |
download | FreeBSD-src-619b731f5bb5e09dcf1eaf1fbd96383ca64398fd.zip FreeBSD-src-619b731f5bb5e09dcf1eaf1fbd96383ca64398fd.tar.gz |
Reviewed by: julian and (hsu?)
Submitted by: John Birrel(L?)
changes for threadsafe operations
Diffstat (limited to 'lib/csu/i386')
-rw-r--r-- | lib/csu/i386/crt0.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/csu/i386/crt0.c b/lib/csu/i386/crt0.c index ecafd5d..2cd03c3 100644 --- a/lib/csu/i386/crt0.c +++ b/lib/csu/i386/crt0.c @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: crt0.c,v 1.20 1995/10/29 09:49:21 phk Exp $ + * $Id: crt0.c,v 1.21 1995/11/02 12:42:42 ache Exp $ */ #include <sys/param.h> @@ -98,6 +98,7 @@ extern start() asm("start"); extern mcount() asm ("mcount"); extern int main(int argc, char **argv, char **envp); int __syscall(int syscall,...); +void _thread_init(); #ifdef MCRT0 void monstartup(void *low, void *high); #endif /* MCRT0 */ @@ -181,6 +182,13 @@ asm("eprol:"); monstartup(&eprol, &etext); #endif /* MCRT0 */ + /* + * Initialize the initial thread. + * This function might be a stub if libc does not + * contain thread support. + */ + _thread_init(); + asm ("__callmain:"); /* Defined for the benefit of debuggers */ exit(main(kfp->kargc, argv, environ)); } |