2009-12-17 21:07:42     a problem about rt_pthread

Document created by Aaronwu Employee on Aug 20, 2013
Version 1Show Document
  • View in full screen mode

2009-12-17 21:07:42     a problem about rt_pthread

zhang zhihua (CHINA)

Message: 83651   

 

我想使linux创建一个实时线程,我按照下面这个网站上的说明做了配置:

 

  docs.blackfin.uclinux.org/doku.php?id=linux-kernel:adeos&s[]=rt&s[]=pthread 但是当我使用创建实时线程时提示rt_task_create(&latency_task,"sampling",0,99,T_FPU); rt_task_create未定义,这是什么原因呢?而且我使用RT_TASK mytask也提示 RT_TASK is undefined;我应该包含哪些头文件呢?我已经包含了#include<pthread.h>,我看见相关说明上有的包含#include<linux/sched.h>#include<linux/time.h>#include<linux/rt_task.h>或者#include<native/sched.h>#include<native/time.h>#include<native/rt_task.h>,但是我的编译环境提示找不到这些头文件,

 

是我的头文件不对还是我的Makefile文件有问题呢还是编译器不行呢??

 

我的Makefile如下:

 

CC =bfin-uclinux-gcc

#CC=gcc

LDLIBS += -lpthread

 

EXEC=main

OBJS=main.o udpserver.o udpclient.o

 

all:$(EXEC)

$(EXEC):$(OBJS)

 

$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)

 

romfs:

$(ROMFSINST) /BIN/$(EXEC)

 

.PHONY : clean

clean:

rm -f $(EXEC) *.elf *.gdb *.o *.bak *~

TranslateQuoteReplyEditDelete

 

 

2009-12-18 05:05:29     Re: a problem about rt_pthread

Yi Li (CHINA)

Message: 83689   

 

zhang zhihua,

 

在编译xenomai的过程中,xenomai的library和header文件临时放在 uclinux-dist/staging/usr/ 下面,你说的rt_task_create() 在usr/include/native/task.h.

 

-Yi

Attachments

    Outcomes