aliyun/plugsched

Optimize the code of head_jump.h and stack_check.h.

Opened this issue · 1 comments

Background

These code is a little unclear and not easy to read. For the following points:

  1. It is better to use the sort API from kernel because it is very stable.
  2. The size and address variables of interface functions might be better wrapped into a structure.
  3. The size of interface function is stored in two variables, which one is vm/mod_func_size array and the other is mod/orig_##func##_size variable.

Task

Optimize the code of head_jump.h and stack_check.h.

BTW,don't define global variables in header file.