aboutsummaryrefslogtreecommitdiff
path: root/lib/csu/i386/crt0.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csu/i386/crt0.c')
-rw-r--r--lib/csu/i386/crt0.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/csu/i386/crt0.c b/lib/csu/i386/crt0.c
index ecafd5d7457b..2cd03c30e34a 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));
}