Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.embedded > #464
| From | Przemek Klosowski <przemek@tux.dot.org> |
|---|---|
| Newsgroups | comp.os.linux.embedded |
| Subject | Re: Set Processor Affinity for x86 |
| Date | 2013-04-25 02:08 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <kla362$ham$1@dont-email.me> (permalink) |
| References | <947ac9b6-5cc4-44bb-a466-9365d81d78ca@googlegroups.com> |
On Wed, 24 Apr 2013 01:57:52 -0700, ghosh.subhasish wrote: > Hi, > > I need to understand how to run a function on a core other than the > current. > > For example, my main() function could be on core-0, but I want to run a > function on core-1. > > There are APIs in Linux like sched_setaffinity(); > > The platform that I am using does not have any OS or scheduler. > You are in for a treat. It's easy in Linux because there's a lot if infrastructure already present; you have to accomplish equivalent preparation yourself. Essentially, different cores are separate CPUs that simply look at the same memory; they all execute some code (possibly even same code, e.g. if they were all in idle loop or idle wait). If you want another CPU to execute some routine you have prepared for it, you just have to tell the dispatcher running on that CPU to jump to the memory area where you placed your code.
Back to comp.os.linux.embedded | Previous | Next — Previous in thread | Next in thread | Find similar
Set Processor Affinity for x86 ghosh.subhasish@gmail.com - 2013-04-24 01:57 -0700
Re: Set Processor Affinity for x86 Przemek Klosowski <przemek@tux.dot.org> - 2013-04-25 02:08 +0000
Re: Set Processor Affinity for x86 ghosh.subhasish@gmail.com - 2013-04-25 09:12 -0700
csiph-web