Beispiel #1
0
 static unsafe extern int kevent(KernelEvent *changeList, int nChanges, KernelEvent *eventList, int nEvents, ref TimeSpec timeout);
Beispiel #2
0
 static unsafe extern int kevent(KernelEvent *changeList, int nChanges, KernelEvent *eventList, int nEvents, IntPtr timeout);
Beispiel #3
0
 public bool KEvent(KernelEvent [] changeList, KernelEvent [] eventList)
 {
     unsafe {
         fixed (KernelEvent *cp = &changeList [0])
             fixed (KernelEvent *ep = &eventList [0])
                 return kevent (cp, changeList != null ? changeList.Length : 0, ep, eventList != null ? eventList.Length : 0, IntPtr.Zero) != -1;
     }
 }
Beispiel #4
0
 public bool KEvent(KernelEvent [] changeList, KernelEvent [] eventList, ref TimeSpec timeOut)
 {
     unsafe {
         fixed (KernelEvent *cp = &changeList [0])
             fixed (KernelEvent *ep = &eventList [0])
                 return kevent (cp, changeList != null ? changeList.Length : 0, ep, eventList != null ? eventList.Length : 0, ref timeOut) != -1;
     }
 }
Beispiel #5
0
        public bool KEvent(KernelEvent [] changeList, int nChanges, KernelEvent [] eventList, int nEvents)
        {
            if (changeList != null && changeList.Length < nChanges)
                throw new ArgumentException ("nChanges is larger than the number of elements in changeList");

            if (eventList != null && eventList.Length < nEvents)
                throw new ArgumentException ("nChanges is larger than the number of elements in changeList");

            unsafe {
                fixed (KernelEvent *cp = &changeList [0])
                    fixed (KernelEvent *ep = &eventList [0])
                        return kevent (cp, nChanges, ep, nEvents, IntPtr.Zero) != -1;
            }
        }
		public int KEvent (KernelEvent [] changeList, int nChanges, KernelEvent [] eventList, int nEvents, ref TimeSpec timeOut)
		{
			if (changeList != null && changeList.Length < nChanges)
				throw new ArgumentException ("nChanges is larger than the number of elements in changeList");

			if (eventList != null && eventList.Length < nEvents)
				throw new ArgumentException ("nChanges is larger than the number of elements in changeList");
			
			unsafe {
				fixed (KernelEvent *cp = &changeList [0])
					fixed (KernelEvent *ep = &eventList [0])
						return kevent (handle, cp, nChanges, ep, nEvents, ref timeOut);
			}
		}