函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\exit.c Create Date:2022-07-27 10:02:49
Last Modify:2020-03-17 11:17:32 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Turn us into a lazy TLB process if we* aren't already..

函数原型:static void exit_mm(void)

返回类型:void

参数:

437  mm等于mm
440  exit_mm_release(当前进程, mm)
441  如果非mm则返回
443  sync_mm_rss(mm)
451  lock for reading
452  core_state等于 coredumping support
453  如果core_state
456  lease a read lock
458  task等于当前进程
459  next等于xchg( & next, & self)
464  如果atomic_dec_and_test( & nr_threads)则complete( & startup)
467  循环
469  如果非task退出
473  set_current_state() includes a barrier so that the write of current->state* is correctly serialised wrt the caller's subsequent test of whether to* actually sleep:* for (;;) {* set_current_state(TASK_UNINTERRUPTIBLE);* if (!need_sleep)* break;* (就绪态)
474  lock for reading
476  mmgrab() - Pin a &struct mm_struct
477  BUG_ON(mm != active_mm)
479  Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring* subscriptions and synchronises with wait4(). Also used in procfs. Also* pins the final release of task.io_context. Also protects ->cpuset and* ->cgroup.subsys[]. And ->vfork_done.
480  mm = NULL
481  lease a read lock
482  通知底层不需要切换虚拟地址空间
483  task_unlock(当前进程)
484  A task is exiting. If it owned this mm, find a new owner for the mm.
485  Decrement the use count and release all resources for an mm.
486  如果test_thread_flag(s terminating due to OOM killer )则exit_oom_victim()
调用者
名称描述
do_exit