From: Jerry Van Baren <vanbaren_gerald@si.com>
To: linuxppc-dev@lists.linuxppc.org
Subject: Re: Critical section - pSOS+
Date: Thu, 04 Jan 2001 16:03:15 -0500 [thread overview]
Message-ID: <4.3.2.20010104155613.00be8a20@falcon.si.com> (raw)
In-Reply-To: <Pine.SCO.3.91.1010104092854.21798A-100000@vayudoot>
I forgot if splx() returns the current value of the interrupt enable
bit. If it doesn't, modify it to do so. If I recall correctly, the
routine is in the BSP (been a little while since I messed with PPC
pSOS). If I recall wrongly, you may need to write your own version of
splx(), naming it something else to avoid name collisions, and use it
instead of the provided splx().
Once your splx() routine returns the current value of the EE flag, save
it in a variable, and restore the value when you exit your critical region.
Something like...
void foo()
{
int ee;
ee = splix(1); /* mask interrupts */
bar()
splx(ee); /* restore the interrupt level */
}
gvb
At 09:37 AM 1/4/01 +0530, Srinivas Rao.M wrote:
>Hi to all,
>
> I am sorry, This question is not releated to the list directly.
>
> We have a custom board built using MPC860 processor and running the
>pSOS+ kernel. We are running a multitasking application on this. we are
>facing a problem with the critical section.
>we have in pSOS+, splx(1) and splx(0) calls for disabling and enabling the
>interrupts respectively. Having multiple tasks running on the kernel,
>suppose if one task disables the interrupt by calling splx(1),
>The other task can enable the interrupts back to the old posture by
>calling splx(0). Hence the critical section code is left in the non
>critical section area. Unlike UNIX, pSOS+ doesnot provide, the interrupts
>locking (and unlocking) mechanism at the task level.
>In such contexts how can we solve this problem.
>
>Thanks in advance.
>Srini...
>
>--
>
>The beginning of knowledge is the discovery of something we do not
>understand.
>-Frank Herbert
>(contributed by Chris Johnston)
>
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2001-01-04 21:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-04 1:45 separate kernel as code segment and data segment for linux ppc ? Rolf Liu
2001-01-04 3:14 ` separate kernel as code segment and data segment for linux p Gary Thomas
2001-01-04 3:49 ` Rolf Liu
2001-01-04 4:07 ` Critical section - pSOS+ Srinivas Rao.M
2001-01-04 21:03 ` Jerry Van Baren [this message]
2001-01-05 5:19 ` Srinivas Rao.M
2001-01-04 18:07 ` separate kernel as code segment and data segment for linux p Dan Malek
2001-01-04 8:50 ` separate kernel as code segment and data segment for linux ppc ? Wolfgang Denk
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=4.3.2.20010104155613.00be8a20@falcon.si.com \
--to=vanbaren_gerald@si.com \
--cc=linuxppc-dev@lists.linuxppc.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).