pollevent.cc (8229:78bf55f23338) | pollevent.cc (9905:2a7c8ec11cff) |
---|---|
1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 199 unchanged lines hidden (view full) --- 208 if (flags == -1) 209 panic("Could not set up async IO"); 210 211 if (set) 212 flags |= FASYNC; 213 else 214 flags &= ~(FASYNC); 215 | 1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 199 unchanged lines hidden (view full) --- 208 if (flags == -1) 209 panic("Could not set up async IO"); 210 211 if (set) 212 flags |= FASYNC; 213 else 214 flags &= ~(FASYNC); 215 |
216 if (fcntl(fd, F_SETFL, flags) == -1) 217 panic("Could not set up async IO"); 218 | |
219 if (set) { 220 if (fcntl(fd, F_SETOWN, getpid()) == -1) 221 panic("Could not set up async IO"); 222 } | 216 if (set) { 217 if (fcntl(fd, F_SETOWN, getpid()) == -1) 218 panic("Could not set up async IO"); 219 } |
220 221 if (fcntl(fd, F_SETFL, flags) == -1) 222 panic("Could not set up async IO"); |
|
223} 224 225void 226PollQueue::setupHandler() 227{ 228 struct sigaction act; 229 230 act.sa_handler = handleIO; --- 49 unchanged lines hidden --- | 223} 224 225void 226PollQueue::setupHandler() 227{ 228 struct sigaction act; 229 230 act.sa_handler = handleIO; --- 49 unchanged lines hidden --- |