| OLD | NEW |
| 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
| 2 /* This Source Code Form is subject to the terms of the Mozilla Public | 2 /* This Source Code Form is subject to the terms of the Mozilla Public |
| 3 * License, v. 2.0. If a copy of the MPL was not distributed with this | 3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 5 | 5 |
| 6 #include "primpl.h" | 6 #include "primpl.h" |
| 7 #include "pprmwait.h" | 7 #include "pprmwait.h" |
| 8 | 8 |
| 9 #define _MW_REHASH_MAX 11 | 9 #define _MW_REHASH_MAX 11 |
| 10 | 10 |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 { | 468 { |
| 469 PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); | 469 PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); |
| 470 PR_Lock(group->ml); | 470 PR_Lock(group->ml); |
| 471 goto failed_alloc; | 471 goto failed_alloc; |
| 472 } | 472 } |
| 473 if (NULL != old_polling_list) | 473 if (NULL != old_polling_list) |
| 474 PR_DELETE(old_polling_list); | 474 PR_DELETE(old_polling_list); |
| 475 PR_Lock(group->ml); | 475 PR_Lock(group->ml); |
| 476 if (_prmw_running != group->state) | 476 if (_prmw_running != group->state) |
| 477 { | 477 { |
| 478 PR_DELETE(poll_list); |
| 478 PR_SetError(PR_INVALID_STATE_ERROR, 0); | 479 PR_SetError(PR_INVALID_STATE_ERROR, 0); |
| 479 goto aborted; | 480 goto aborted; |
| 480 } | 481 } |
| 481 group->polling_list = poll_list; | 482 group->polling_list = poll_list; |
| 482 group->polling_count = new_count; | 483 group->polling_count = new_count; |
| 483 } | 484 } |
| 484 | 485 |
| 485 now = PR_IntervalNow(); | 486 now = PR_IntervalNow(); |
| 486 polling_interval = max_polling_interval; | 487 polling_interval = max_polling_interval; |
| 487 since_last_poll = now - group->last_poll; | 488 since_last_poll = now - group->last_poll; |
| (...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1447 #endif | 1448 #endif |
| 1448 | 1449 |
| 1449 return result; /* what we live for */ | 1450 return result; /* what we live for */ |
| 1450 | 1451 |
| 1451 bad_argument: | 1452 bad_argument: |
| 1452 PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); | 1453 PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); |
| 1453 return NULL; /* probably ambiguous */ | 1454 return NULL; /* probably ambiguous */ |
| 1454 } /* PR_EnumerateWaitGroup */ | 1455 } /* PR_EnumerateWaitGroup */ |
| 1455 | 1456 |
| 1456 /* prmwait.c */ | 1457 /* prmwait.c */ |
| OLD | NEW |