Contains named_semaphore native API. 
- Namespace
 - xtd::native 
 
- Library
 - xtd.core.native
 
- Warning
 - Internal use only 
 
 | 
| static intmax_t  | create (int32_t initial_count, int32_t max_count, const std::string &name) | 
|   | Create named semaphore with specified name, initial count and maxixum count.  
  | 
|   | 
| static void  | destroy (intmax_t handle, const std::string &name) | 
|   | Destroy named semaphore with specified semaphore handle.  
  | 
|   | 
| static size_t  | max_name_size () | 
|   | Gets the maximum name size supported.  
  | 
|   | 
| static intmax_t  | open (const std::string &name) | 
|   | Open named semaphore with specified name.  
  | 
|   | 
| static bool  | signal (intmax_t handle, int32_t release_count, int32_t &previous_count, bool &io_error) | 
|   | Signal named semaphore with specified semaphore handle.  
  | 
|   | 
| static uint32_t  | wait (intmax_t handle, int32_t milliseconds_timeout) | 
|   | Wait named semaphore with specified semaphore handle and timeout.  
  | 
|   | 
◆ create()
  
  
      
        
          | static intmax_t xtd::native::named_semaphore::create  | 
          ( | 
          int32_t  | 
          initial_count,  | 
         
        
           | 
           | 
          int32_t  | 
          max_count,  | 
         
        
           | 
           | 
          const std::string &  | 
          name  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
staticprotected   | 
  
 
Create named semaphore with specified name, initial count and maxixum count. 
- Parameters
 - 
  
    | name | The name, if the synchronization object is to be shared with other processes.  | 
  
   
- Returns
 - The handle of the created semaphore. 
 
- Warning
 - Internal use only 
 
 
 
◆ destroy()
  
  
      
        
          | static void xtd::native::named_semaphore::destroy  | 
          ( | 
          intmax_t  | 
          handle,  | 
         
        
           | 
           | 
          const std::string &  | 
          name  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
staticprotected   | 
  
 
Destroy named semaphore with specified semaphore handle. 
- Parameters
 - 
  
    | name | The name of the semaphore.  | 
    | handle | The semaphore handle to destroy.  | 
  
   
- Warning
 - Internal use only 
 
 
 
◆ max_name_size()
  
  
      
        
          | static size_t xtd::native::named_semaphore::max_name_size  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
staticprotected   | 
  
 
Gets the maximum name size supported. 
- Returns
 - The maximum name size supported. 
 
- Warning
 - Internal use only 
 
 
 
◆ open()
  
  
      
        
          | static intmax_t xtd::native::named_semaphore::open  | 
          ( | 
          const std::string &  | 
          name | ) | 
           | 
         
       
   | 
  
staticprotected   | 
  
 
Open named semaphore with specified name. 
- Parameters
 - 
  
    | name | The name, if the synchronization object is to be shared with other processes.  | 
  
   
- Returns
 - The handle of the opened semaphore. 
 
- Warning
 - Internal use only 
 
 
 
◆ signal()
  
  
      
        
          | static bool xtd::native::named_semaphore::signal  | 
          ( | 
          intmax_t  | 
          handle,  | 
         
        
           | 
           | 
          int32_t  | 
          release_count,  | 
         
        
           | 
           | 
          int32_t &  | 
          previous_count,  | 
         
        
           | 
           | 
          bool &  | 
          io_error  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
staticprotected   | 
  
 
Signal named semaphore with specified semaphore handle. 
- Parameters
 - 
  
    | handle | The semaphore handle to signal.  | 
  
   
- Returns
 - true if succeed; otherwhise false. 
 
- Warning
 - Internal use only 
 
 
 
◆ wait()
  
  
      
        
          | static uint32_t xtd::native::named_semaphore::wait  | 
          ( | 
          intmax_t  | 
          handle,  | 
         
        
           | 
           | 
          int32_t  | 
          milliseconds_timeout  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
staticprotected   | 
  
 
Wait named semaphore with specified semaphore handle and timeout. 
- Parameters
 - 
  
    | handle | The semaphore handle to wait.  | 
    | milliseconds_timeout | The timeout in milliseconds (-1 is infinite timeout).  | 
  
   
- Returns
 - error code :
- 0x00000000 : Sucess
 
- 0x00000080 : Abandoned
 
- 0x00000102 : Timeout
 
- 0xFFFFFFFF : Failed 
 
 
- Warning
 - Internal use only 
 
 
 
The documentation for this class was generated from the following file: