From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7b65fc33a05f24b6 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!t26g2000prh.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: A curiosity... Date: Thu, 4 Dec 2008 13:17:27 -0800 (PST) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1228425447 21721 127.0.0.1 (4 Dec 2008 21:17:27 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 4 Dec 2008 21:17:27 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: t26g2000prh.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:3845 Date: 2008-12-04T13:17:27-08:00 List-Id: On Dec 4, 12:47 pm, mockturtle wrote: > Excuse me while I turn the heat up... I suddenly > feel a chill down my spine.... ;-) Just in case that chill is starting to go away, please remember that the kids who are learning C from tutorials like that today, are the ones who will be writing the programs that go into automobiles and airplanes and nuclear weapons in the next generation. That chill coming back yet? Sorry about that. :) OK, maybe this will make you feel better: int main() { int t; pthread_t th[10]; int args[10]; for (t=0; t<10; t++) { args[t] = t; pthread_create(&th[t], NULL, thr_main, (void*) &args[t]); } } Ahhh, sanity at last... (Or at least as much as you can expect from C...) -- Adam