patchAVR C Runtime Library - Patches: patch #6500, Reentrant code faq

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #6500: Reentrant code faq

Submitter:  Mark Litwack <mlitwack>
Submitted:  Wed 30 Apr 2008 10:56:18 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  arcanum Open/Closed:  Closed

Tue 19 Aug 2008 07:44:35 PM UTC, comment #2: 

Committed version 4 of this patch. I did not include Anatoly's comments if they were not included in this version of the patch.

Thanks Mark!

Eric Weddington <arcanum>
Group administrator
Thu 01 May 2008 02:32:30 PM UTC, comment #1: 

+ <tr>
+  <td>pgm_*_far()</td>
+  <td>Accesses I/O register RAMPZ.</td>
+  <td>Protect calls with cli()/sei(), ATOMIC_BLOCK(), or use OS locking.</td>
+ </tr>


The GCC starting from 4.3 save RAMPZ register in interrupt handler routines, and don't demand protect RAMPZ register accesses and 'pgm_*_far' calls.

Certainly, RT-OSes should be changed, and save the RAMPZ register at context switching.

Anatoly.

Anatoly Sokolov <aesok>
Group administrator
Wed 30 Apr 2008 10:56:18 PM UTC, original submission:  

Date: Mon, 7 Apr 2008 08:56:59 -0600
Message-ID: <258DDD1F44B6ED4AAFD4370847CF58D50117A4D1@csomb01.corp.atmel.com>
In-Reply-To: <200804071022.50405.mlitwack@employees.org>
Thread-Topic: AW: [avr-gcc-list] reentrant interrupt service routine
Thread-Index: AciYu0Kz/U2G9VocRI+0Qcm5/ksRvwAA+KbQ
References: <779849.34611.qm@web31801.mail.mud.yahoo.com><200804030840.22552.dmixm@marine.febras.ru><200804021819.51499.mlitwack@employees.org> <200804071022.50405.mlitwack@employees.org>
From: "Weddington, Eric" <eweddington@cso.atmel.com>
To: "Mark Litwack" <mlitwack@employees.org>,
 <avr-gcc-list@nongnu.org>
Status: R

=20

> -----Original Message-----
> From:=20
> avr-gcc-list-bounces+eweddington=3Dcso.atmel.com@nongnu.org=20
> [mailto:avr-gcc-list-bounces+eweddington=3Dcso.atmel.com@nongnu.
> org] On Behalf Of Mark Litwack
> Sent: Monday, April 07, 2008 8:23 AM
> To: -email is unavailable-
> Subject: Re: AW: [avr-gcc-list] reentrant interrupt service routine
>=20
> I don't mean to carry on a conversation with myself, so if
> no one else is interested in reentrant/non-reentrant I'll be
> quiet now, but I would appreciate any other non-reentrant
> issues that people know about.  It's hard to find these
> things when they happen.
>  =20


Yes, I think other are interested (I'm interested at least), but it's
just that other developers haven't had the time to look into it.

Since you're going through this, what would be extremely helpful is if
you could do these things:

- Create a list of functions that are known re-entrant, and not
re-entrant. This could be put into the avr-libc user manual for other
users. Better to put it in the docs, then left to rot in an email
archive.
- For those functions that are not re-entrant open up a bug report, set
it the Priority (I think it's that field) to "1-Wish". That way it's on
a list to add such re-entrant functions (where possible) at some point,
but at least it's in the system.

Thanks,
Eric Weddington

Mark Litwack <mlitwack>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #15629:  avr-doc-reentrant-v4.diff added by mlitwack (6KiB - text/x-patch - Added clearerr() fdevopen() fclose(). This patch supersedes the previous.)
file #15573:  avr-doc-reentrant-v3.diff added by mlitwack (5KiB - text/x-patch - Incorporated Anatoly's comment (thanks!). This patch supersedes the previous.)
file #15572:  avr-doc-reentrant-v2.diff added by mlitwack (5KiB - text/x-patch - Found another issue. This patch supersedes the previous.)
file #15568:  avr-doc-reentrant.diff added by mlitwack (5KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by arcanum (Posted a comment)
  • -email is unavailable- added by aesok (Posted a comment)
  • -email is unavailable- added by mlitwack (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-08-19 arcanum StatusNone Done
        Assigned toNone arcanum
        Open/ClosedOpen Closed
    2008-05-07 mlitwack Attached File- Added avr-doc-reentrant-v4.diff, #15629
    2008-05-01 mlitwack Attached File- Added avr-doc-reentrant-v3.diff, #15573
    2008-05-01 mlitwack Attached File- Added avr-doc-reentrant-v2.diff, #15572
    2008-04-30 mlitwack Attached File- Added avr-doc-reentrant.diff, #15568

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code