Merge pull request #439 from mono-soc-2012/garyb/iconfix
[mono.git] / mcs / class / System / System.Threading / Semaphore.cs
index d39cb280b427d50ce71de533f36f4e88814521f9..1e197fca87f8748426320a7f95071e0776f486fb 100644 (file)
@@ -80,7 +80,7 @@ namespace System.Threading {
                {
                }
 
-               [MonoTODO ("Does not support access control, semaphoreSecurity is ignored")]
+               [MonoTODO ("CreateSemaphore_internal does not support access control, semaphoreSecurity is ignored")]
                public Semaphore (int initialCount, int maximumCount, string name, out bool createdNew, 
                        SemaphoreSecurity semaphoreSecurity)
                {
@@ -96,10 +96,12 @@ namespace System.Threading {
                                                           out createdNew);
                }
 
-               [MonoTODO]
                public SemaphoreSecurity GetAccessControl ()
                {
-                       throw new NotImplementedException ();
+                       return new SemaphoreSecurity (SafeWaitHandle,
+                                                     AccessControlSections.Owner |
+                                                     AccessControlSections.Group |
+                                                     AccessControlSections.Access);
                }
 
                [PrePrepareMethod]
@@ -128,13 +130,12 @@ namespace System.Threading {
                        return (ret);
                }
 
-               [MonoTODO]
                public void SetAccessControl (SemaphoreSecurity semaphoreSecurity)
                {
                        if (semaphoreSecurity == null)
                                throw new ArgumentNullException ("semaphoreSecurity");
-
-                       throw new NotImplementedException ();
+                               
+                       semaphoreSecurity.PersistModifications (SafeWaitHandle);
                }
 
                // static methods