linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Muthukumar Ratty <muthu@iqmail.net>
To: Ankit Jain <ankitjain1580@yahoo.com>
Cc: linux prg <linux-c-programming@vger.kernel.org>,
	gcc <gcc-help@gcc.gnu.org>
Subject: Re: soft real-time scheduling
Date: Sun, 26 Sep 2004 08:06:05 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.33.0409260800360.26309-100000@Muruga.localdomain> (raw)
In-Reply-To: <20040926140831.62007.qmail@web52901.mail.yahoo.com>


Hi, This is offtopic for this list.

from http://gcc.gnu.org/lists.html

"gcc-help is a relatively high volume list for people searching for help
in building or using GCC."


Anyway, for your question... i see few problems

1.    struct sched_param *p;
    sched_getparam(0,p);
Using unallocated memory. will result in SEGV

2. When you get 1 corrected, you may get another error
From man 2 sched_setscheduler
<snip>
EPERM  The calling process does not have appropriate  privileges.
<snip>

On Sun, 26 Sep 2004, Ankit Jain wrote:

> hi
>
>  /* soft realtime scheduling variable */
>    struct sched_param *p;
>
>
>  /* set soft real-time scheduling */
>    sched_getparam(0,p);
>    p->sched_priority = 50;
>    if (sched_setscheduler(0,SCHED_FIFO,p))
>      fprintf(stderr,"Could not change scheduler
> settings\n");
>
> if anyone knows about this then i need some help
>
> p is a pointer to the structure sched_param which is
> defined in sched.h
>
> this structure has a variable __sched_priority where i
> have to set the priority of the process
>
> p->sched_priority =50 this line gives a segmentation
> fault.
> how t oaccess this variable (__sched_priority) of the
> header file
>
> thanks
>
> ankit
>
> ________________________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping"
> your friends today! Download Messenger Now
> http://uk.messenger.yahoo.com/download/index.html
>



  reply	other threads:[~2004-09-26 15:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-26 14:08 soft real-time scheduling Ankit Jain
2004-09-26 15:06 ` Muthukumar Ratty [this message]
2004-09-26 15:13 ` Eljay Love-Jensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.33.0409260800360.26309-100000@Muruga.localdomain \
    --to=muthu@iqmail.net \
    --cc=ankitjain1580@yahoo.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).