Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 08-12-2018, 09:33 PM   #1
LQ Newbie
Registered: Mar 2018
Posts: 5

Rep: Reputation: Disabled
riffa linux driver modification with round-robin scheduling

For , why am I having the following error: invalid use of undefined type ‘struct sched_param’ ? I have included sched.h

I am trying to make scheduled with round-robin policy

Note: For the riffa_driver.c, please refer to the ubuntu paste. This forum does not allow posting of long code.

phung@UbuntuHW15:~/Documents/fpga_overlay/riffa/driver/linux$ make clean && make debug
rm -Rf *.ko *.cmd *.o *.so *.so.* .*.cmd Module.symvers Module.markers modules.order *.mod.c .tmp_versions
Compiling driver for kernel: 4.17.4-041704-generic with the following values
     NAME: 'riffa'
   MAJNUM: '100'
VENDOR_ID1: '1172'

sed -i 's/#define MAJOR_NUM [^\n]*/#define MAJOR_NUM 100/g' riffa_driver.h
sed -i 's/#define DEVICE_NAME [^\n]*/#define DEVICE_NAME "riffa"/g' riffa_driver.h
sed -i 's/#define VENDOR_ID0 [^\n]*/#define VENDOR_ID0 0x10EE/g' riffa_driver.h
sed -i 's/#define VENDOR_ID1 [^\n]*/#define VENDOR_ID1 0x1172/g' riffa_driver.h
sed -i 's/#define DEBUG [^\n]*/#define DBUG 1/g' riffa_driver.h
sed -i 's/#define DBUG [^\n]*/#define DEBUG 1/g' riffa_driver.h
make -C /lib/modules/`uname -r`/build SUBDIRS=`pwd` modules
make[1]: Entering directory '/usr/src/linux-headers-4.17.4-041704-generic'
  CC [M]  /home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.o
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c: In function ‘chnl_recv’:
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:601:12: error: invalid use of undefined type ‘struct sched_param’
  recv_param.sched_priority = 1;
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c: In function ‘chnl_send’:
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:831:12: error: invalid use of undefined type ‘struct sched_param’
  send_param.sched_priority = 1;
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c: At top level:
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:133:27: error: storage size of ‘recv_param’ isn’t known
 static struct sched_param recv_param;
/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:134:27: error: storage size of ‘send_param’ isn’t known
 static struct sched_param send_param;
scripts/ recipe for target '/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.o' failed
make[2]: *** [/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.o] Error 1
Makefile:1577: recipe for target '_module_/home/phung/Documents/fpga_overlay/riffa/driver/linux' failed
make[1]: *** [_module_/home/phung/Documents/fpga_overlay/riffa/driver/linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.17.4-041704-generic'
Makefile:94: recipe for target 'riffa.ko' failed
make: *** [riffa.ko] Error 2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
RIFFA linux driver c coding question promach Programming 2 03-27-2018 09:46 AM
What is the minimum round robin scheduing interval supported by linux? cwang_sh Linux - Kernel 1 08-12-2014 08:12 PM
Scheduling through Round robin utkarshrawat Programming 3 05-16-2011 09:33 AM
Real-time Round-Robin Scheduling cttran Programming 2 05-06-2005 04:41 PM
Round Robin DNS Lucsi Linux - Software 1 07-18-2002 04:17 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:36 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration