mirror of
https://github.com/cuberite/libevent.git
synced 2025-08-04 01:36:23 -04:00
minor corrections; change license to 3-clause BSD license
svn:r84
This commit is contained in:
parent
763f6a7730
commit
c3f496c71b
5
epoll.c
5
epoll.c
@ -10,10 +10,7 @@
|
|||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* 3. All advertising materials mentioning features or use of this software
|
* 3. The name of the author may not be used to endorse or promote products
|
||||||
* must display the following acknowledgement:
|
|
||||||
* This product includes software developed by Niels Provos.
|
|
||||||
* 4. The name of the author may not be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
@ -10,10 +10,7 @@
|
|||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* 3. All advertising materials mentioning features or use of this software
|
* 3. The name of the author may not be used to endorse or promote products
|
||||||
* must display the following acknowledgement:
|
|
||||||
* This product includes software developed by Niels Provos.
|
|
||||||
* 4. The name of the author may not be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
5
event.c
5
event.c
@ -12,10 +12,7 @@
|
|||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* 3. All advertising materials mentioning features or use of this software
|
* 3. The name of the author may not be used to endorse or promote products
|
||||||
* must display the following acknowledgement:
|
|
||||||
* This product includes software developed by Niels Provos.
|
|
||||||
* 4. The name of the author may not be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
5
event.h
5
event.h
@ -12,10 +12,7 @@
|
|||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* 3. All advertising materials mentioning features or use of this software
|
* 3. The name of the author may not be used to endorse or promote products
|
||||||
* must display the following acknowledgement:
|
|
||||||
* This product includes software developed by Niels Provos.
|
|
||||||
* 4. The name of the author may not be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
@ -10,10 +10,7 @@
|
|||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* 3. All advertising materials mentioning features or use of this software
|
* 3. The name of the author may not be used to endorse or promote products
|
||||||
* must display the following acknowledgement:
|
|
||||||
* This product includes software developed by Niels Provos.
|
|
||||||
* 4. The name of the author may not be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
7
kqueue.c
7
kqueue.c
@ -12,10 +12,7 @@
|
|||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* 3. All advertising materials mentioning features or use of this software
|
* 3. The name of the author may not be used to endorse or promote products
|
||||||
* must display the following acknowledgement:
|
|
||||||
* This product includes software developed by Niels Provos.
|
|
||||||
* 4. The name of the author may not be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
@ -59,7 +56,7 @@
|
|||||||
#define log_error warn
|
#define log_error warn
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_INTTYPES_H
|
#if defined(HAVE_INTTYPES_H) && !defined(__OpenBSD__)
|
||||||
#define INTPTR(x) (intptr_t)x
|
#define INTPTR(x) (intptr_t)x
|
||||||
#else
|
#else
|
||||||
#define INTPTR(x) x
|
#define INTPTR(x) x
|
||||||
|
5
poll.c
5
poll.c
@ -12,10 +12,7 @@
|
|||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* 3. All advertising materials mentioning features or use of this software
|
* 3. The name of the author may not be used to endorse or promote products
|
||||||
* must display the following acknowledgement:
|
|
||||||
* This product includes software developed by Niels Provos.
|
|
||||||
* 4. The name of the author may not be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
14
rtsig.c
14
rtsig.c
@ -285,8 +285,9 @@ rtsig_dispatch(void *arg, struct timeval *tv)
|
|||||||
signum = sigtimedwait(&op->sigs, &info, &ts);
|
signum = sigtimedwait(&op->sigs, &info, &ts);
|
||||||
|
|
||||||
if (signum == -1) {
|
if (signum == -1) {
|
||||||
if (errno == EAGAIN) break;
|
if (errno == EAGAIN)
|
||||||
return errno == EINTR ? 0 : -1;
|
break;
|
||||||
|
return (errno == EINTR ? 0 : -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ts.tv_sec = ts.tv_nsec = 0;
|
ts.tv_sec = ts.tv_nsec = 0;
|
||||||
@ -381,8 +382,10 @@ rtsig_dispatch(void *arg, struct timeval *tv)
|
|||||||
int flags = 0;
|
int flags = 0;
|
||||||
struct event *ev = op->toev[i];
|
struct event *ev = op->toev[i];
|
||||||
|
|
||||||
if (op->poll[i].revents & POLLIN) flags |= EV_READ;
|
if (op->poll[i].revents & POLLIN)
|
||||||
if (op->poll[i].revents & POLLOUT) flags |= EV_WRITE;
|
flags |= EV_READ;
|
||||||
|
if (op->poll[i].revents & POLLOUT)
|
||||||
|
flags |= EV_WRITE;
|
||||||
|
|
||||||
if (!(ev->ev_events & EV_PERSIST)) {
|
if (!(ev->ev_events & EV_PERSIST)) {
|
||||||
event_del(ev);
|
event_del(ev);
|
||||||
@ -422,6 +425,9 @@ rtsig_dispatch(void *arg, struct timeval *tv)
|
|||||||
/* We just freed it, we shouldn't have a problem getting it back. */
|
/* We just freed it, we shouldn't have a problem getting it back. */
|
||||||
op->poll = malloc(sizeof(*op->poll) * op->max);
|
op->poll = malloc(sizeof(*op->poll) * op->max);
|
||||||
op->toev = malloc(sizeof(*op->toev) * op->max);
|
op->toev = malloc(sizeof(*op->toev) * op->max);
|
||||||
|
|
||||||
|
if (op->poll == NULL || op->toev == NULL)
|
||||||
|
err(1, "%s: malloc");
|
||||||
}
|
}
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
|
5
select.c
5
select.c
@ -12,10 +12,7 @@
|
|||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* 3. All advertising materials mentioning features or use of this software
|
* 3. The name of the author may not be used to endorse or promote products
|
||||||
* must display the following acknowledgement:
|
|
||||||
* This product includes software developed by Niels Provos.
|
|
||||||
* 4. The name of the author may not be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
5
signal.c
5
signal.c
@ -12,10 +12,7 @@
|
|||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* 3. All advertising materials mentioning features or use of this software
|
* 3. The name of the author may not be used to endorse or promote products
|
||||||
* must display the following acknowledgement:
|
|
||||||
* This product includes software developed by Niels Provos.
|
|
||||||
* 4. The name of the author may not be used to endorse or promote products
|
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
Loading…
x
Reference in New Issue
Block a user