问题描述
- how current marco works in IA32
-
When I brose the code in Linux kernel 2.6.24, I find this.static __always_inline struct task_struct *get_current(void) { return x86_read_percpu(current_task); }
When I am looking for x86_read_percpue, It looks like this.
#define x86_read_percpu(var) percpu_from_op("mov", per_cpu__##var)
But it seems like this.
#define percpu_from_op(op,var) ({ typeof(var) ret__; switch (sizeof(var)) { case 1: asm(op "b "__percpu_seg"%1,%0" : "=r" (ret__) : "m" (var)); break; case 2: asm(op "w "__percpu_seg"%1,%0" : "=r" (ret__) : "m" (var)); break; case 4: asm(op "l "__percpu_seg"%1,%0" : "=r" (ret__) : "m" (var)); break; default: __bad_percpu_size(); } ret__; })
I can't find per_cpu_current_task in source code!!!!!!!
解决方案
This had me beating my head against the wall for days. Now as you know, It is fairly straightforward to open an SDL surface in a window:
SDL_Surface *screen = SDL_SetVideoMode(width, height, 24, SDL_......
答案就在这里:How to make an SDL window the child of another window in Win32
时间: 2024-10-24 16:49:05