Subversion Repositories Kolibri OS

Rev

Rev 4872 | Rev 4921 | 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 <reent.h>
  6. #include <kos32sys.h>
  7.  
  8.  
  9. void init_reent()
  10. {
  11.     struct _reent *ent;
  12.  
  13.     ent = user_alloc(sizeof(struct _reent));
  14.  
  15.     _REENT_INIT_PTR(ent);
  16.  
  17.     __asm__ __volatile__(
  18.     "movl %0, %%fs:16"
  19.     ::"r"(ent));
  20.     __sinit(ent);
  21. }
  22.  
  23.  
  24.  
  25.  
  26.