Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

logLib

194 views
Skip to first unread message

Rashmi_Topno

unread,
May 4, 2001, 7:21:29 AM5/4/01
to
Hi All,

There is a facility in vxWorks called "message logging" which is provided by
the library logLib. What I could understand is, this is used when an I/O
operation has to be done in ISR level, or at some point where we don't want
to pend the task till the operation is over. So through logMsg we push the
message into a queue and logTask (which starts at the time of launching the
vxSim) takes the data from the queue.

My queries are

1> Is the logTask takes the data from the queue and prints it out on the
simulator screen? I am using vxSim.

2> How the priority of the logTask is managed? Will it be dynamically
changed by the kernel so as to ensure that it will be always having lower
priority than the priority of the task which is logging the msg? I am asking
this question as it has been written that logMsg api doesn't make the
current state waiting for the function to get executed. This means this
should not get scheduled and logtask gets CPU time, while a task logs the
msg.

3> I want to use my own logTask, instead of the OS deifned one. I want to
have some other functionality within that task. How can I do that? Is it
possible?

4> In configAll.h there is a constant called MAX_LOG_MSGS. But what will
happen if I mention a number that is greater than MAX_LOG_MSGS in logInit
api ?

Thanks in advance
Rashmi

Johan Borkhuis

unread,
May 4, 2001, 8:38:39 AM5/4/01
to
Rashmi_Topno <Rashmi...@bla.satyam.com> wrote:
> 1> Is the logTask takes the data from the queue and prints it out on
> the simulator screen? I am using vxSim.

The data is send to stdout, so normally it will be send to the console.

> 2> How the priority of the logTask is managed? Will it be dynamically
> changed by the kernel so as to ensure that it will be always having
> lower priority than the priority of the task which is logging the msg?

This task has a fixed priority of 0 (=high).

> 3> I want to use my own logTask, instead of the OS deifned one. I want
> to have some other functionality within that task. How can I do that?
> Is it possible?

Better not. What you can do is create a device with open, close, read and
write, and connect this to the logging mechanism. This device will receive
all the data and can process it (for example keep a log of all the errors
in NVRAM).

> 4> In configAll.h there is a constant called MAX_LOG_MSGS. But what
> will happen if I mention a number that is greater than MAX_LOG_MSGS in
> logInit api ?

This is the length of the message queue.

Groeten,
Johan

--
o o o o o o o . . . _____________________________
o _____ || Johan Borkhuis |
.][__n_n_|DD[ ====_____ | bork...@agere.com |
>(________|__|_[_________]_|__________________________|
_/oo OOOOO oo` ooo ooo 'o!o!o o!o!o`
=== VxWorks FAQ: http://www.xs4all.nl/~borkhuis/vxworks/vxworks.html ===

Baron, Ken (N-BAE Systems)

unread,
May 4, 2001, 11:55:17 AM5/4/01
to

> Hi All,
>
> There is a facility in vxWorks called "message logging" which is provided
> by
> the library logLib. What I could understand is, this is used when an I/O
> operation has to be done in ISR level, or at some point where we don't
> want
> to pend the task till the operation is over. So through logMsg we push the
> message into a queue and logTask (which starts at the time of launching
> the
> vxSim) takes the data from the queue.
>
> My queries are
>
> 1> Is the logTask takes the data from the queue and prints it out on the
> simulator screen? I am using vxSim.
[Baron, Ken] tlogTask takes data from the Q and prints it on the
console, by default.

> 2> How the priority of the logTask is managed? Will it be dynamically
> changed by the kernel so as to ensure that it will be always having lower

> priority than the priority of the task which is logging the msg? I am
> asking
> this question as it has been written that logMsg api doesn't make the
> current state waiting for the function to get executed. This means this
> should not get scheduled and logtask gets CPU time, while a task logs the
> msg.

[Baron, Ken] If tLogTask is higher priority than the task that
calls logMsg, the calling task will block until tLogTask is done. BUT WHAT
IS EVEN WORSE is that if the messageQueue is full, the logMsg() call will
block if called from a task. If called from interrupt, logMsg() will not
block, and the message will be dropped if the Queue is full.

??
Does anyone know if there is a way to make logMsg() non blocking
when called from a task?
??

> 3> I want to use my own logTask, instead of the OS deifned one. I want to
> have some other functionality within that task. How can I do that? Is it
> possible?
>

> 4> In configAll.h there is a constant called MAX_LOG_MSGS. But what will
> happen if I mention a number that is greater than MAX_LOG_MSGS in logInit
> api ?

[Baron, Ken] MAX_LOG_MSGS is used in the logInit call to set the
size of the messageQueue that logMsg() sends to. You can change MAX_LOG_MSGS
or use a different number when calling logInit().

> Thanks in advance
> Rashmi
>

0 new messages