Allocate and initialize a struct fail_point_entry */
| 274 | |
| 275 | /* Allocate and initialize a struct fail_point_entry */ |
| 276 | static struct fail_point_entry * |
| 277 | fail_point_entry_new(struct fail_point_setting *fp_setting) |
| 278 | { |
| 279 | struct fail_point_entry *fp_entry; |
| 280 | |
| 281 | fp_entry = fp_malloc(sizeof(struct fail_point_entry), |
| 282 | M_WAITOK | M_ZERO); |
| 283 | fp_entry->fe_parent = fp_setting->fs_parent; |
| 284 | fp_entry->fe_prob = PROB_MAX; |
| 285 | fp_entry->fe_pid = NO_PID; |
| 286 | fp_entry->fe_count = FE_COUNT_UNTRACKED; |
| 287 | TAILQ_INSERT_TAIL(&fp_setting->fp_entry_queue, fp_entry, |
| 288 | fe_entries); |
| 289 | |
| 290 | return (fp_entry); |
| 291 | } |
| 292 | |
| 293 | /* Free a struct fail_point_entry */ |
| 294 | static void |