* Free the resources held by a fail_point, and wake any paused threads. * Thou shalt not allow threads to hit this fail point after you enter this * function, nor shall you call this multiple times for a given fp. * @ingroup failpoint */
| 516 | * @ingroup failpoint |
| 517 | */ |
| 518 | void |
| 519 | fail_point_destroy(struct fail_point *fp) |
| 520 | { |
| 521 | |
| 522 | fail_point_drain(fp, 0); |
| 523 | |
| 524 | if ((fp->fp_flags & FAIL_POINT_DYNAMIC_NAME) != 0) { |
| 525 | fp_free(__DECONST(void *, fp->fp_name)); |
| 526 | fp->fp_name = NULL; |
| 527 | } |
| 528 | fp->fp_flags = 0; |
| 529 | if (fp->fp_callout) { |
| 530 | fp_free(fp->fp_callout); |
| 531 | fp->fp_callout = NULL; |
| 532 | } |
| 533 | |
| 534 | sx_xlock(&sx_fp_set); |
| 535 | fail_point_garbage_collect(); |
| 536 | sx_xunlock(&sx_fp_set); |
| 537 | } |
| 538 | |
| 539 | /** |
| 540 | * This does the real work of evaluating a fail point. If the fail point tells |
nothing calls this directly
no test coverage detected