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

Comparing libeio/etp.c (file contents):
Revision 1.2 by root, Mon Aug 18 04:26:03 2014 UTC vs.
Revision 1.3 by root, Thu Jun 25 15:59:57 2015 UTC

83static xmutex_t wrklock; 83static xmutex_t wrklock;
84static xmutex_t reslock; 84static xmutex_t reslock;
85static xmutex_t reqlock; 85static xmutex_t reqlock;
86static xcond_t reqwait; 86static xcond_t reqwait;
87 87
88struct etp_tmpbuf
89{
90 void *ptr;
91 int len;
92};
93
94static void *
95etp_tmpbuf_get (struct etp_tmpbuf *buf, int len)
96{
97 if (buf->len < len)
98 {
99 free (buf->ptr);
100 buf->ptr = malloc (buf->len = len);
101 }
102
103 return buf->ptr;
104}
105
88typedef struct etp_worker 106typedef struct etp_worker
89{ 107{
90 struct tmpbuf tmpbuf; 108 struct etp_tmpbuf tmpbuf;
91 109
92 /* locked by wrklock */ 110 /* locked by wrklock */
93 struct etp_worker *prev, *next; 111 struct etp_worker *prev, *next;
94 112
95 xthread_t tid; 113 xthread_t tid;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines