ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev_port.c
(Generate patch)

Comparing libev/ev_port.c (file contents):
Revision 1.13 by root, Fri Nov 21 02:10:34 2008 UTC vs.
Revision 1.18 by root, Tue Oct 20 19:06:55 2009 UTC

1/* 1/*
2 * libev solaris event port backend 2 * libev solaris event port backend
3 * 3 *
4 * Copyright (c) 2007,2008 Marc Alexander Lehmann <libev@schmorp.de> 4 * Copyright (c) 2007,2008,2009 Marc Alexander Lehmann <libev@schmorp.de>
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without modifica- 7 * Redistribution and use in source and binary forms, with or without modifica-
8 * tion, are permitted provided that the following conditions are met: 8 * tion, are permitted provided that the following conditions are met:
9 * 9 *
83{ 83{
84 int res, i; 84 int res, i;
85 struct timespec ts; 85 struct timespec ts;
86 uint_t nget = 1; 86 uint_t nget = 1;
87 87
88 EV_RELEASE_CB;
88 ts.tv_sec = (time_t)timeout; 89 ts.tv_sec = (time_t)timeout;
89 ts.tv_nsec = (long)(timeout - (ev_tstamp)ts.tv_sec) * 1e9; 90 ts.tv_nsec = (long)(timeout - (ev_tstamp)ts.tv_sec) * 1e9;
90 res = port_getn (backend_fd, port_events, port_eventmax, &nget, &ts); 91 res = port_getn (backend_fd, port_events, port_eventmax, &nget, &ts);
92 EV_ACQUIRE_CB;
91 93
92 if (res == -1) 94 if (res == -1)
93 { 95 {
94 if (errno != EINTR && errno != ETIME) 96 if (errno != EINTR && errno != ETIME)
95 ev_syserr ("(libev) port_getn"); 97 ev_syserr ("(libev) port_getn (see http://bugs.opensolaris.org/view_bug.do?bug_id=6268715, try LIBEV_FLAGS=3 env variable)");
96 98
97 return; 99 return;
98 } 100 }
99 101
100 for (i = 0; i < nget; ++i) 102 for (i = 0; i < nget; ++i)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines