ObjFW  Diff

Differences From Artifact [a975466b61]:

To Artifact [dd46f03e3d]:

  • File src/OFKernelEventObserver.h — part of check-in [45518ae7b7] at 2016-03-20 14:07:47 on branch trunk — Use the locked queue for kqueue and epoll as well

    _readObjects must only be changed from the thread running the observer
    and not from a thread adding or removing objects to observe. This is
    already handled by the locked queue used by poll and select, so the best
    way to solve this is to use the locked queue for kqueue and epoll as
    well. (user: js, size: 6493) [annotate] [blame] [check-ins using]


21
22
23
24
25
26
27

28
29
30
31
32
33
34
OF_ASSUME_NONNULL_BEGIN

@class OFMutableArray OF_GENERIC(ObjectType);
@class OFDate;
#ifdef OF_HAVE_THREADS
@class OFMutex;
#endif


/*!
 * @protocol OFKernelEventObserverDelegate
 *	     OFKernelEventObserver.h ObjFW/OFKernelEventObserver.h
 *
 * @brief A protocol that needs to be implemented by delegates for
 *	  OFKernelEventObserver.







>







21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
OF_ASSUME_NONNULL_BEGIN

@class OFMutableArray OF_GENERIC(ObjectType);
@class OFDate;
#ifdef OF_HAVE_THREADS
@class OFMutex;
#endif
@class OFDataArray;

/*!
 * @protocol OFKernelEventObserverDelegate
 *	     OFKernelEventObserver.h ObjFW/OFKernelEventObserver.h
 *
 * @brief A protocol that needs to be implemented by delegates for
 *	  OFKernelEventObserver.
116
117
118
119
120
121
122


123
124
125
126
127
128
129
#else
	of_socket_t _cancelFD[2];
	struct sockaddr_in _cancelAddr;
#endif
#ifdef OF_HAVE_THREADS
	OFMutex *_mutex;
#endif


}

/*!
 * The delegate for the OFKernelEventObserver.
 */
@property OF_NULLABLE_PROPERTY (assign)
    id <OFKernelEventObserverDelegate> delegate;







>
>







117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#else
	of_socket_t _cancelFD[2];
	struct sockaddr_in _cancelAddr;
#endif
#ifdef OF_HAVE_THREADS
	OFMutex *_mutex;
#endif
	OFDataArray *_queueActions;
	OFMutableArray *_queueObjects;
}

/*!
 * The delegate for the OFKernelEventObserver.
 */
@property OF_NULLABLE_PROPERTY (assign)
    id <OFKernelEventObserverDelegate> delegate;