mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: rml@tech9.net, mingo@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] How to write a portable "run_on" program?
Date: Thu, 08 May 2003 17:00:24 +1000	[thread overview]
Message-ID: <20030508070647.EDD0C2C092@lists.samba.org> (raw)
In-Reply-To: Your message of "Wed, 07 May 2003 22:31:43 MST." <Pine.LNX.4.44.0305072221120.16772-100000@home.transmeta.com>

In message <Pine.LNX.4.44.0305072221120.16772-100000@home.transmeta.com> you write:
> In other words, the proper way to do set_cpu() is
> 
> 	int set_cpu(int cpu)
> 	{
> 		fd_set cpuset;
> 
> 		FD_ZERO(&cpuset);
> 		FD_SET(cpu, cpuset);
> 		return sched_setaffinity(getpid(), sizeof(cpuset), &cpuset);
> 	}
> 
> which is a HELL OF A LOT more readable than the crap you're spouting 
> (either your "before" _or_ your "after" crap).

Congratulations: you're the only programmer to get this right.   It's
not your code I'm worried about 8(

Meanwhile, everyone is doing "unsigned long" because it "works on
x86".

Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

      parent reply	other threads:[~2003-05-08  6:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-08  5:14 Rusty Russell
2003-05-08  5:31 ` Linus Torvalds
2003-05-08  7:00   ` Rusty Russell
2003-05-08  7:00   ` Rusty Russell [this message]

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=20030508070647.EDD0C2C092@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rml@tech9.net \
    --cc=torvalds@transmeta.com \
    /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

Powered by JetHome