From: Tathagata Das <tathagata@alumnux.com>
To: ecos-discuss@ecos.sourceware.org
Subject: [ECOS] printf problem
Date: Thu, 10 Aug 2006 14:57:00 -0000 [thread overview]
Message-ID: <44DB49C2.4060309@alumnux.com> (raw)
Hi all,
I am trying to write serial driver.
My problem is printf is working in cyg_user_start function, but does not
work from any thread.
I have debugged. From thread context, serial_write function is not invoked.
diag_printf is working in thread.
Here is my program ----
void entry_point1(cyg_addrword_t data)
{
for(;;) {
cyg_thread_delay(100);
diag_printf("\n5");
printf("0");
}
}
void entry_point2(cyg_addrword_t data)
{
for(;;) {
cyg_thread_delay(200);
diag_printf("\n6");
printf("1");
}
}
void cyg_user_start(void)
{
printf("tatha");
cyg_thread_create(4, entry_point1, (cyg_addrword_t) "A", "Thread
1", (void *) stack[0], 4096, &thread1, &thread_s[0]);
cyg_thread_create(4, entry_point2, (cyg_addrword_t) "B", "Thread
2", (void *) stack[1], 4096, &thread2, &thread_s[1]);
cyg_thread_resume(thread1);
cyg_thread_resume(thread2);
}
I am geting "tatha", "5" and "6" ... but not getting "0" or "1"
Probably I am missing something.
I will be very pleased if somebody help me.
Regards,
Tatha
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
next reply other threads:[~2006-08-10 14:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-10 14:57 Tathagata Das [this message]
2006-08-10 15:02 ` Gary Thomas
2006-08-10 15:09 ` Tathagata Das
-- strict thread matches above, loose matches on Subject: below --
2010-05-31 18:27 Manuel Borchers
[not found] ` <alpine.DEB.2.00.1005312056160.5904@sg-laptop>
2010-06-01 8:49 ` Manuel Borchers
2010-06-01 10:52 ` Manuel Borchers
2010-06-01 16:56 ` Manuel Borchers
2004-08-30 15:52 [ECOS] Printf problem Aniket S Joshi
2004-08-30 14:10 Aniket S Joshi
2004-08-30 14:31 ` Andrew Lunn
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=44DB49C2.4060309@alumnux.com \
--to=tathagata@alumnux.com \
--cc=ecos-discuss@ecos.sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).