Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!killer!texbell!sugar!ficc!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond From: diamond@csl.sony.JUNET (Norman Diamond) Newsgroups: comp.lang.c Subject: Re: Argument Passing in C (Stacks) Message-ID: <10036@socslgw.csl.sony.JUNET> Date: 11 Oct 88 23:41:00 GMT References: <705.2339B3D8@stjhmc.fidonet.org> <699@wsccs.UUCP> <202@obie.UUCP> Organization: Sony Computer Science Laboratory Inc., Tokyo, Japan Lines: 27 In <202@obie.UUCP>, wes@obie.UUCP (Barnacle Wes) writes (almost): > POP MACRO a > L R5,a > LA R5,4(R5) > MEND > PUSH MACRO a > S R5,=F'4' > ST R5,a > MEND > The problem with these macros is that they are not atomic. I can't > think of any straightforward reasons why this is a problem, but I'm > sure it would cause problems somewhere, somehow. No problems should be caused by not being atomic. Real problems are caused when programmers carelessly use machine instructions such as POP a or PUSH a and think that they are atomic. In fact, such instructions are also non-atomic (nearly always if not always) and careless programmers create obscure bugs in multiprocessing systems. -- ------------------------------------------------------------------------------- The above opinions are my own. | Norman Diamond If they're also your opinions, | Sony Computer Science Laboratory, Inc. you're infringing my copyright. | diamond%csl.sony.jp@relay.cs.net