4.10.      171

getgrgid_r()
getgrnam_r()
getpwuid_r()
sterror_r()
strtok_r()
readdir_r()
rand_r()
ttyname_r()

       , -
     ,  
    .    -
,   ,     
 .      ,
    .    
,       
.       
   ,    ,  
   .     -
     .

        -
.        -
     .       -
   .  ,     -
    ,    ,
     .   
  . ,     -
 .   , threadi  thread2,   -
 funcA (),        .
 , thread3,   funcB ().   , -
   funcA (), ,     
       threadi  thread2:

threadi                thread2                  thread3
{                       {                        {

lock()                  lock()                    funcBO
funcA()                 funcA()                }

unlock()                unlock()
}                       }

       funcA ()    
     .      . 
  funcA ()  funcB ()    ,   
    .    threadi 
thread2     funcA (),  thread3  
 funcB ()      .    -
    "",   funcA ()  funcB () -
          .

     "",   -
  iostream. ,     ,   ,  -
     , cout,   
  ostream.    ""  ""  -