home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.forth      Forth programmers eat a lot of Bratwurst      117,927 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 116,454 of 117,927   
   Anton Ertl to Paul Rubin   
   Re: Numeric string output - conspicuousl   
   03 May 24 16:54:55   
   
   From: anton@mips.complang.tuwien.ac.at   
      
   Paul Rubin  writes:   
   >The Linux man page for sprintf   
   >and friends has the thread safety attribute "MT-Safe locale" for those   
   >functions.  I don't know what that means exactly though.   
      
   That's why the man page points you to attributes(7), and when I do   
      
   man 7 attributes   
      
   it tells me that MT-Safe means "thread-safe", i.e., "safe to call in   
   the presence of other threads."   
      
   About the "locale" remark it says:   
      
   |Functions annotated with locale as an MT-Safety issue read from the   
   |locale object without any form of synchronization.  Functions   
   |annotated with locale called concurrently with locale changes may   
   |behave in ways that do not correspond to any of the locales active   
   |during their execution, but an unpredictable mix thereof.   
      
   But you are not supposed to change the locale in a multi-threaded   
   program.   
      
   Anyway, the locale thing shows a problem with the suggestion to use   
   sprintf() instead of ecvt_r().   
      
   - anton   
   --   
   M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html   
   comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html   
        New standard: https://forth-standard.org/   
      EuroForth 2023: https://euro.theforth.net/2023   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca