kern_proc.c (b249ce48ea5560afdcff57e72a9880b7d3132434) | kern_proc.c (1c29da02798d968eb874b86221333a56393a94c3) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-3-Clause 3 * 4 * Copyright (c) 1982, 1986, 1989, 1991, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 2655 unchanged lines hidden (view full) --- 2664 if (td == NULL) { 2665 continue; 2666 } 2667 bzero(kkstp, sizeof(*kkstp)); 2668 (void)sbuf_new(&sb, kkstp->kkst_trace, 2669 sizeof(kkstp->kkst_trace), SBUF_FIXEDLEN); 2670 thread_lock(td); 2671 kkstp->kkst_tid = td->td_tid; | 1/*- 2 * SPDX-License-Identifier: BSD-3-Clause 3 * 4 * Copyright (c) 1982, 1986, 1989, 1991, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 2655 unchanged lines hidden (view full) --- 2664 if (td == NULL) { 2665 continue; 2666 } 2667 bzero(kkstp, sizeof(*kkstp)); 2668 (void)sbuf_new(&sb, kkstp->kkst_trace, 2669 sizeof(kkstp->kkst_trace), SBUF_FIXEDLEN); 2670 thread_lock(td); 2671 kkstp->kkst_tid = td->td_tid; |
2672 if (TD_IS_SWAPPED(td)) { | 2672 if (TD_IS_SWAPPED(td)) |
2673 kkstp->kkst_state = KKST_STATE_SWAPPED; | 2673 kkstp->kkst_state = KKST_STATE_SWAPPED; |
2674 } else if (TD_IS_RUNNING(td)) { 2675 if (stack_save_td_running(st, td) == 0) 2676 kkstp->kkst_state = KKST_STATE_STACKOK; 2677 else 2678 kkstp->kkst_state = KKST_STATE_RUNNING; 2679 } else { | 2674 else if (stack_save_td(st, td) == 0) |
2680 kkstp->kkst_state = KKST_STATE_STACKOK; | 2675 kkstp->kkst_state = KKST_STATE_STACKOK; |
2681 stack_save_td(st, td); 2682 } | 2676 else 2677 kkstp->kkst_state = KKST_STATE_RUNNING; |
2683 thread_unlock(td); 2684 PROC_UNLOCK(p); 2685 stack_sbuf_print(&sb, st); 2686 sbuf_finish(&sb); 2687 sbuf_delete(&sb); 2688 error = SYSCTL_OUT(req, kkstp, sizeof(*kkstp)); 2689 PROC_LOCK(p); 2690 if (error) --- 531 unchanged lines hidden --- | 2678 thread_unlock(td); 2679 PROC_UNLOCK(p); 2680 stack_sbuf_print(&sb, st); 2681 sbuf_finish(&sb); 2682 sbuf_delete(&sb); 2683 error = SYSCTL_OUT(req, kkstp, sizeof(*kkstp)); 2684 PROC_LOCK(p); 2685 if (error) --- 531 unchanged lines hidden --- |