Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #1501
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end |
|---|---|
| From | jgk@panix.com (Joe keane) |
| Newsgroups | comp.compilers |
| Subject | Re: Question about inter-thread stack references |
| Date | Tue, 27 Jan 2015 02:53:48 +0000 (UTC) |
| Organization | Public Access Networks Corp. |
| Lines | 46 |
| Sender | news@iecc.com |
| Approved | comp.compilers@iecc.com |
| Message-ID | <15-01-044@comp.compilers> (permalink) |
| References | <15-01-015@comp.compilers> <15-01-042@comp.compilers> <15-01-043@comp.compilers> |
| NNTP-Posting-Host | news.iecc.com |
| X-Trace | miucha.iecc.com 1422498173 86582 2001:470:1f07:1126:0:676f:7373:6970 (29 Jan 2015 02:22:53 GMT) |
| X-Complaints-To | abuse@iecc.com |
| NNTP-Posting-Date | Thu, 29 Jan 2015 02:22:53 +0000 (UTC) |
| Keywords | parallel |
| Posted-Date | 28 Jan 2015 21:22:53 EST |
| X-submission-address | compilers@iecc.com |
| X-moderator-address | compilers-request@iecc.com |
| X-FAQ-and-archives | http://compilers.iecc.com |
| Xref | csiph.com comp.compilers:1501 |
Show key headers only | View raw
Kaz Kylheku <kaz@kylheku.com> wrote:
> message_t request, reply;
>
> init_request(&request, ... args);
>
> if (send_request(other_thread, &request, &reply) == SEND_OK) {
> /* reply object contains reply */
> }
It is more like:
struct my_request request;
struct my_reply reply;
/* request is dead, reply is dead */
put_stuff_into_request(&request, args);
/* request is live, reply is dead */
do_some_bullshit_with_request(&request, args);
/* request is live, reply is dead */
err = enqueue_request_and_reply(queue, args, &request, &reply);
/* request is live, reply is live */
do_some_bullshit();
/* request is live, reply is live */
err = dequeue_request_and_reply(queue, args, &request, &reply);
/* request is dead, reply is live */
do_some_bullshit_with_reply(&reply, args);
/* request is dead, reply is live */
get_stuff_out_of_reply(&reply, args);
/* request is dead, reply is dead */
It is OK if both threads are in one function, but it is easy to make a
benign change that breaks things, or worse, usually works.
Back to comp.compilers | Previous | Next — Previous in thread | Find similar | Unroll thread
Question about inter-thread stack references Ivan Godard <ivan@ootbcomp.com> - 2015-01-15 23:54 -0800
Re: Question about inter-thread stack references Louis Krupp <lkrupp@nospam.pssw.com.invalid> - 2015-01-16 22:28 -0700
Re: Question about inter-thread stack references glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-01-17 18:46 +0000
Re: Question about inter-thread stack references George Neuner <gneuner2@comcast.net> - 2015-01-18 01:58 -0500
Re: Question about inter-thread stack references glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-01-18 21:47 +0000
Re: Question about inter-thread stack references glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-01-18 23:24 +0000
Re: Question about inter-thread stack references Stefan Monnier <monnier@iro.umontreal.ca> - 2015-01-18 08:35 -0500
Re: Question about inter-thread stack references Kaz Kylheku <kaz@kylheku.com> - 2015-01-18 17:12 +0000
Re: Question about inter-thread stack references Ivan Godard <ivan@ootbcomp.com> - 2015-01-18 12:49 -0800
Re: Question about inter-thread stack references jgk@panix.com (Joe keane) - 2015-01-25 09:27 +0000
Re: Question about inter-thread stack references Kaz Kylheku <kaz@kylheku.com> - 2015-01-25 18:46 +0000
Re: Question about inter-thread stack references jgk@panix.com (Joe keane) - 2015-01-27 02:53 +0000
csiph-web