Function report |
Source Code:kernel\debug\kdb\kdb_main.c |
Create Date:2022-07-28 11:42:23 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:kdb_per_cpu - This function implements the 'per_cpu' command.
Proto:static int kdb_per_cpu(int argc, const char **argv)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| int | argc | |
| const char ** | argv |
| 2562 | nextarg = 1 |
| 2563 | bytesperword = 0 , whichcpu = ~0UL |
| 2565 | If argc < 1 || argc > 3 Then Return KDB_ARGCOUNT |
| 2568 | diag = kdbgetaddrarg - This function is responsible for parsing an* address-expression and returning the value of the expression,* symbol name, and offset to the caller |
| 2572 | If argc >= 2 Then |
| 2577 | If Not bytesperword Then bytesperword = KDB_WORD_SIZE |
| 2579 | Else if bytesperword > KDB_WORD_SIZE Then Return KDB_BADWIDTH |
| 2581 | sprintf(fmtstr, "%%0%dlx ", (int)(2 * bytesperword)) |
| 2582 | If argc >= 3 Then |
| 2586 | If whichcpu >= Setup number of possible processor ids || Not cpu_online(whichcpu) Then |
| 2587 | kdb_printf("cpu %ld is not online\n", whichcpu) |
| 2588 | Return KDB_BADCPUNUM |
| 2604 | for_each_online_cpu(cpu) |
| 2605 | If KDB_FLAG(CMD_INTERRUPT) Then Return 0 |
| 2612 | If diag Then |
| 2613 | kdb_printf("%5d "kdb_bfd_vma_fmt0" - unable to read, diag=%d\n", cpu, addr, diag) |
| 2615 | Continue |
| 2617 | kdb_printf("%5d ", cpu) |
| 2623 | Return 0 |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |