uclinux-2008R1-RC8(bf561)到VDSP5的移植(22):spinlock_types.h

来源:互联网 发布:sopcast网络电视url 编辑:程序博客网 时间:2024/06/05 04:32
 
  
为了支持多核,在config.h中定义了一个宏:
#define       CONFIG_SMP                           1
定义宏之后,提示找不到asm/spinlock_types.h,这个文件用于定义两个结构体和两个宏,如下所示:
#ifndef __ASM_SPINLOCK_TYPES_H
#define __ASM_SPINLOCK_TYPES_H
 
#ifndef __LINUX_SPINLOCK_TYPES_H
# error "please don't include this file directly"
#endif
 
typedef struct {
     volatile unsigned int lock;
} raw_spinlock_t;
 
#define __RAW_SPIN_LOCK_UNLOCKED { 0 }
 
typedef struct {
     volatile unsigned int lock;
} raw_rwlock_t;
 
#define __RAW_RW_LOCK_UNLOCKED       { 0 }
 
#endif
在这里,由于不知道__RAW_SPIN_LOCK_UNLOCKED__RAW_RW_LOCK_UNLOCKED的确切意义,暂时先将它定义为0,还有,lock似乎应该定义为testset_t的类型,暂时先这样吧。
当然,由于uclinux不支持SMP,这个文件必须手工创建并放在include/asm目录下。
原创粉丝点击