Remove `old' parameters from set functions

This commit is contained in:
Laurence Withers 2007-10-27 17:43:28 +00:00
parent 51e14f327f
commit cfcea63f7a
2 changed files with 6 additions and 12 deletions

View File

@ -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;
if(old_mask) *old_mask = si->mask;
mnew = *mask;
sigdelset(&mnew, SIGBUS);
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,
lwevent_signalcb* old_callback)
void lwevent_signalfd_setcb(struct lwevent_signal* si, lwevent_signalcb callback)
{
if(old_callback) *old_callback = si->callback;
si->callback = callback;
}

View File

@ -134,23 +134,21 @@ lwevent_signalcb lwevent_signalfd_getcb(const struct lwevent_signal* si)
\param si Signal receiver object.
\param mask The new mask to enact.
\param oldmask The old mask. May be 0.
\retval 0 on success.
\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()
for a discussion of the full behaviour of the receiver. The application may retrieve the previous
mask by passing a pointer to a signal set in \a oldmask.
for a discussion of the full behaviour of the receiver.
*/
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));
/*! \brief Modiy signal receiver's callback function. */
void lwevent_signalfd_setcb(struct lwevent_signal* si, lwevent_signalcb callback,
lwevent_signalcb* old_callback) __attribute__((nonnull));
void lwevent_signalfd_setcb(struct lwevent_signal* si, lwevent_signalcb callback)
__attribute__((nonnull));