framebuffer_alloc()
来源:互联网 发布:java手机游戏免费下载 编辑:程序博客网 时间:2024/05/16 11:17
linux-2.6.22/includenux/fb.h
framebuffer_alloc()功能是向内核申请一段大小为sizeof(struct fb_info) + size的空间,其中size的大小代表设备的私有数据空间,并用fb_info的par域指向该私有空间。
framebuffer_alloc()功能是向内核申请一段大小为sizeof(struct fb_info) + size的空间,其中size的大小代表设备的私有数据空间,并用fb_info的par域指向该私有空间。
struct fb_info *framebuffer_alloc(size_t size, struct device *dev){#define BYTES_PER_LONG (BITS_PER_LONG/8)#define PADDING (BYTES_PER_LONG - (sizeof(struct fb_info) % BYTES_PER_LONG)) int fb_info_size = sizeof(struct fb_info); struct fb_info *info; char *p; if (size) fb_info_size += PADDING; p = kzalloc(fb_info_size + size, GFP_KERNEL); if (!p) return NULL; info = (struct fb_info *) p; if (size) info->par = p + fb_info_size; info->device = dev;#ifdef CONFIG_FB_BACKLIGHT mutex_init(&info->bl_curve_mutex);#endif return info;#undef PADDING#undef BYTES_PER_LONG}
0 0
- framebuffer_alloc
- framebuffer_alloc()
- framebuffer_alloc函数详解
- [Leetcode] 60. Permutation Sequence 解题报告
- yii2 常用ActiveForm表单样式用法总结
- 火星人永久家园建立在何处?
- python 3.4 error: Microsoft Visual C++ 10.0 is required(Unable to find)亲测解决办法
- Leetcode 3. Longest Substring Without Repeating Characters
- framebuffer_alloc()
- concurrent实现多线程的线程池开发
- 学习任何游戏引擎,编程语言,都应该进来看看
- 在spring中常被忽视的注解 @Primary
- Android/Java仿微信按时间长短分类显示时间戳
- Leetcode 76. Minimum Window Substring
- Ionic javascript Api | ion-view 视图的生命周期及事件集合
- Android 回调接口
- Android 限制只调用系统相机 不弹出应用选择器