public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Natarajan, Mekala (CTS)" <NMekala@chn.cognizant.com>
To: "'ecos-discuss@sources.redhat.com'" <ecos-discuss@sources.redhat.com>
Subject: [ECOS] microsec delay
Date: Fri, 16 Feb 2001 03:15:00 -0000	[thread overview]
Message-ID: <8F1D166D08ACD41196EE00B0D020944B68B6C2@CTSINENTSXUB> (raw)

Hi,
	i am trying out with the micro-sec delay MACRO to  get microsec
delay. This is the sample program that i am trying. But when i run this
program from gdb it gives SIGILL-illegal instruction.       


#include <cyg/kernel/kapi.h>
#include <pkgconf/redboot.h>
#include <pkgconf/hal.h>
#include <cyg/hal/hal_if.h>
#include <cyg/hal/hal_tables.h>
#include CYGHWR_MEMORY_LAYOUT_H

int main(void)
{
  int i = 2;
  int j = 0;
  int ticks;
  diag_printf("\ni=%d\n",i);
  ticks=do_ms_tick();
  diag_printf("\n ticks = %d\n",ticks);
  return 0;
}


unsigned long
do_ms_tick(void)
{
    static unsigned long ticks = 0;
    CYGACC_CALL_IF_DELAY_US(1000);   // Wait for 1ms
    return ++ticks;
}

Can someone help on this..

mekala

This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly 
prohibited and may be unlawful.

		Visit us at http://www.cognizant.com

                 reply	other threads:[~2001-02-16  3:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=8F1D166D08ACD41196EE00B0D020944B68B6C2@CTSINENTSXUB \
    --to=nmekala@chn.cognizant.com \
    --cc=ecos-discuss@sources.redhat.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).