| 1277 | } |
| 1278 | |
| 1279 | void socketSetPending(xsSocket xss, uint8_t pending) |
| 1280 | { |
| 1281 | uint8_t doSchedule; |
| 1282 | |
| 1283 | modCriticalSectionBegin(); |
| 1284 | |
| 1285 | if (((xss->pending & pending) == pending) || (xss->pending & kPendingClose)) { |
| 1286 | modCriticalSectionEnd(); |
| 1287 | return; |
| 1288 | } |
| 1289 | |
| 1290 | doSchedule = 0 == xss->pending; |
| 1291 | xss->pending |= pending; |
| 1292 | |
| 1293 | if (doSchedule && (xss->constructed || (pending & kPendingAcceptListener))) { |
| 1294 | socketUpUseCount(xss->the, xss); |
| 1295 | modCriticalSectionEnd(); |
| 1296 | |
| 1297 | if (!xss->suspended) |
| 1298 | modMessagePostToMachine(xss->the, NULL, 0, socketClearPending, xss); |
| 1299 | } |
| 1300 | else |
| 1301 | modCriticalSectionEnd(); |
| 1302 | } |
| 1303 | |
| 1304 | void socketClearPending(void *the, void *refcon, uint8_t *message, uint16_t messageLength) |
| 1305 | { |
no test coverage detected