Remove `old' parameters from set functions
This commit is contained in:
parent
51e14f327f
commit
cfcea63f7a
|
@ -93,12 +93,10 @@ lwevent_signalcb lwevent_signalfd_getcb(const struct lwevent_signal* si)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int lwevent_signalfd_setsigs(struct lwevent_signal* si, const sigset_t* mask, sigset_t* old_mask)
|
int lwevent_signalfd_setsigs(struct lwevent_signal* si, const sigset_t* mask)
|
||||||
{
|
{
|
||||||
sigset_t mnew;
|
sigset_t mnew;
|
||||||
|
|
||||||
if(old_mask) *old_mask = si->mask;
|
|
||||||
|
|
||||||
mnew = *mask;
|
mnew = *mask;
|
||||||
sigdelset(&mnew, SIGBUS);
|
sigdelset(&mnew, SIGBUS);
|
||||||
sigdelset(&mnew, SIGFPE);
|
sigdelset(&mnew, SIGFPE);
|
||||||
|
@ -112,10 +110,8 @@ int lwevent_signalfd_setsigs(struct lwevent_signal* si, const sigset_t* mask, si
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void lwevent_signalfd_setcb(struct lwevent_signal* si, lwevent_signalcb callback,
|
void lwevent_signalfd_setcb(struct lwevent_signal* si, lwevent_signalcb callback)
|
||||||
lwevent_signalcb* old_callback)
|
|
||||||
{
|
{
|
||||||
if(old_callback) *old_callback = si->callback;
|
|
||||||
si->callback = callback;
|
si->callback = callback;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -134,23 +134,21 @@ lwevent_signalcb lwevent_signalfd_getcb(const struct lwevent_signal* si)
|
||||||
|
|
||||||
\param si Signal receiver object.
|
\param si Signal receiver object.
|
||||||
\param mask The new mask to enact.
|
\param mask The new mask to enact.
|
||||||
\param oldmask The old mask. May be 0.
|
|
||||||
\retval 0 on success.
|
\retval 0 on success.
|
||||||
\retval -1 on error (and see \a errno).
|
\retval -1 on error (and see \a errno).
|
||||||
|
|
||||||
Changes the set of signals being received by \a si to those set in \a mask. See lwevent_signalfd()
|
Changes the set of signals being received by \a si to those set in \a mask. See lwevent_signalfd()
|
||||||
for a discussion of the full behaviour of the receiver. The application may retrieve the previous
|
for a discussion of the full behaviour of the receiver.
|
||||||
mask by passing a pointer to a signal set in \a oldmask.
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
int lwevent_signalfd_setsigs(struct lwevent_signal* si, const sigset_t* mask, sigset_t* oldmask)
|
int lwevent_signalfd_setsigs(struct lwevent_signal* si, const sigset_t* mask)
|
||||||
__attribute__((nonnull,warn_unused_result));
|
__attribute__((nonnull,warn_unused_result));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*! \brief Modiy signal receiver's callback function. */
|
/*! \brief Modiy signal receiver's callback function. */
|
||||||
void lwevent_signalfd_setcb(struct lwevent_signal* si, lwevent_signalcb callback,
|
void lwevent_signalfd_setcb(struct lwevent_signal* si, lwevent_signalcb callback)
|
||||||
lwevent_signalcb* old_callback) __attribute__((nonnull));
|
__attribute__((nonnull));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue