Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-10-2007, 10:40 AM   #1
LQ Newbie
Registered: Dec 2007
Posts: 2

Rep: Reputation: 0
Question thread scheduler disable & enable


i'am runing 30 threads in a single process & i want the feature to disable & enable the thread scheduler in few threads, i would like to know what are the API's that can be called directly from the APPlication thread to stop the scheduler & start the scheduler.

I tried with ptherad_spin_lock() & pthread_spin_unlock() at the application to compile the code,since the architecture is not an SMP architecture the exection has went to an while(1) mode.

I tried with preempt_enable() & preempt_disable() at the application level....failed to compile the code.

my code:

/* HB LED - 600ms ON state */
ioctl(miscgl, 1, NULL);
usleep(1000 * 600);

/* HB LED - 600ms OFF state */
ioctl(miscgl, 2, NULL);
usleep(1000 * 600);

/* ESD-change - Check for PHY status and reset */
if(stop_trigger_flag == 0)
ioctl(miscgl, ESD_change, NULL);


compilation errors:
hblmain.c: In function `HBLENT':
hblmain.c:181: error: invalid type argument of `->'
hblmain.c:194: error: invalid type argument of `->'
hblmain.c:194: error: `TIF_NEED_RESCHED' undeclared (first use in this function)
hblmain.c:194: error: (Each undeclared identifier is reported only once
hblmain.c:194: error: for each function it appears in.)
make[2]: *** [hblmain.o] Error 1

Balaji singh
Old 12-11-2007, 09:02 PM   #2
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,574
Blog Entries: 4

Rep: Reputation: 3890Reputation: 3890Reputation: 3890Reputation: 3890Reputation: 3890Reputation: 3890Reputation: 3890Reputation: 3890Reputation: 3890Reputation: 3890Reputation: 3890

Maybe you should start by reconsidering exactly what it is you are trying to accomplish. Maybe you're taking the wrong approach. Thirty(?!?!?!) threads...


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
looking for a enable/disable mouse command to X samel_tvom Linux - Hardware 2 03-03-2005 12:00 PM
enable disable Tuttle General 0 01-08-2005 05:21 PM
FC3 yum.repos.d & how to enable/disable - HOW-TO cybrjackle Fedora 3 11-15-2004 02:05 AM
disable ethernet, enable wireless Ryan450 Linux - Wireless Networking 1 09-17-2004 05:53 PM
Enable/Disable GTk CheckButton Claus Programming 2 12-01-2003 05:44 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:18 PM.

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
Open Source Consulting | Domain Registration