Subversion Repositories Kolibri OS

Rev

Rev 4921 | Rev 6664 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. /* default reentrant pointer when multithread enabled */
  2.  
  3. #include <_ansi.h>
  4. #include <string.h>
  5. #include <sys/reent.h>
  6. #include <kos32sys.h>
  7.  
  8. extern _VOID   _EXFUN(__sinit,(struct _reent *));
  9.  
  10. void init_reent()
  11. {
  12.     struct _reent *ent;
  13.  
  14.     ent = user_alloc(sizeof(struct _reent));
  15.  
  16.     _REENT_INIT_PTR(ent);
  17.  
  18.     __asm__ __volatile__(
  19.     "movl %0, %%fs:16"
  20.     ::"r"(ent));
  21.     __sinit(ent);
  22. }
  23.