Re: Condition Variables for RTEMS

2014-02-27 Thread Sebastian Huber
On 2014-02-28 01:12, zhang json wrote: 2014-02-26 1:07 GMT+08:00 Gedare Bloom mailto:ged...@rtems.org>>: You may like to read http://wiki.rtems.org/wiki/index.php/SMP#Non-Preempt_Mode_for_Mutual_Exclusion in addition to the Condition Variables project page. You can search for "

Re: Posix patchs to support affinity attribute in newlib

2014-02-27 Thread Sebastian Huber
On 2014-02-27 14:24, Jennifer Averett wrote: /** + * @brief Copy POSIX Thread attribute structure + * + * This routine copies the attr2 thread attribute structure + * to the attr1 Thread Attribute structure. + * + * @param[out] attr1 is a pointer to the thread attribute + * structure to copy in

Re: Condition Variables for RTEMS

2014-02-27 Thread zhang json
Hi Gedare, 2014-02-26 1:07 GMT+08:00 Gedare Bloom : > You may like to read > > http://wiki.rtems.org/wiki/index.php/SMP#Non-Preempt_Mode_for_Mutual_Exclusion > in addition to the Condition Variables project page. You can search > for "condition variable" in a search engine to get some useful > ba

Re: pthread get attribute

2014-02-27 Thread Gedare Bloom
Ahh, ok. On Thu, Feb 27, 2014 at 10:53 AM, Jennifer Averett wrote: > I dug into this one a little more and on that path the object isn't > found so there is no reason to call put. > > >> -Original Message- >> From: ged...@gwmail.gwu.edu [mailto:ged...@gwmail.gwu.edu] On >> Behalf Of Gedar

RE: pthread get attribute

2014-02-27 Thread Jennifer Averett
I dug into this one a little more and on that path the object isn't found so there is no reason to call put. > -Original Message- > From: ged...@gwmail.gwu.edu [mailto:ged...@gwmail.gwu.edu] On > Behalf Of Gedare Bloom > Sent: Thursday, February 27, 2014 9:18 AM > To: Jennifer Averett > C

Re: Patch for pthread get and set affinity

2014-02-27 Thread Gedare Bloom
On Thu, Feb 27, 2014 at 10:40 AM, Jennifer Averett wrote: > Ok... I see what you were saying now. Calling the > pthread_attr_setaffinity_np from > pthread_setaffinity_np seemed like overkill, when > it was just one line added to the pthread_attr_setaffinity_np > method. > I agree. >> -Origi

RE: Patch for pthread get and set affinity

2014-02-27 Thread Jennifer Averett
Ok... I see what you were saying now. Calling the pthread_attr_setaffinity_np from pthread_setaffinity_np seemed like overkill, when it was just one line added to the pthread_attr_setaffinity_np method. > -Original Message- > From: rtems-devel-boun...@rtems.org [mailto:rtems-devel- > b

Re: Patch for pthread get and set affinity

2014-02-27 Thread Gedare Bloom
Nevermind, you would not gain anything by what I was recommending. What I was saying is that this patch implements pthread_setaffinity_np(). You could have it call pthread_attr_setaffinity_np() instead of directly writing to api->Attributes, e.g. replace CPU_COPY( api->Attributes.affinityset, cpuse

RE: Patch for pthread get and set affinity

2014-02-27 Thread Jennifer Averett
I'm sorry I don't follow this question. This patch is the Implementation and test of pthread_attr_setaffinity_np. Am I missing something? The method sets the api->Attributes affinity. > -Original Message- > From: ged...@gwmail.gwu.edu [mailto:ged...@gwmail.gwu.edu] On > Behalf Of Gedare

RE: patch for pthread attribute get and set affinity

2014-02-27 Thread Jennifer Averett
The copy method in sys/cpuset assumes they are the same size, if you have different sizes the non-used bits will not be set to 0 unless the creator explicitly sets them. > -Original Message- > From: ged...@gwmail.gwu.edu [mailto:ged...@gwmail.gwu.edu] On > Behalf Of Gedare Bloom > Sent: Th

Re: Posix patchs to support affinity attribute in newlib

2014-02-27 Thread Gedare Bloom
On Thu, Feb 27, 2014 at 10:09 AM, Jennifer Averett wrote: > I don't think you can make the default attributes static, as you > can see in pthreadimpl.h it is used by several methods when > to copy the default values into new attributes. > OK, it could be done by adding a "getter" function, but th

Re: pthread get attribute

2014-02-27 Thread Gedare Bloom
In case of an error ESRCH, shouldn't there be an _Objects_Put() call before returning? On Thu, Feb 27, 2014 at 8:30 AM, Jennifer Averett wrote: > Attached is the modified pthread get attribute > patch and its corresponding test. > > > Jennifer Averett > On-Line Applications Research > ___

Re: pthread get attribute

2014-02-27 Thread Gedare Bloom
This issue would apply in some of the other patches submitted that switch on location. On Thu, Feb 27, 2014 at 10:18 AM, Gedare Bloom wrote: > In case of an error ESRCH, shouldn't there be an _Objects_Put() call > before returning? > > On Thu, Feb 27, 2014 at 8:30 AM, Jennifer Averett > wrote: >

Re: Patch for pthread get and set affinity

2014-02-27 Thread Gedare Bloom
Same comments from my email on the other thread apply here. Why don't you use the pthread_attr_setaffinity_np() to set the api->Attributes affinity? -Gedare On Thu, Feb 27, 2014 at 8:28 AM, Jennifer Averett wrote: > > Attached are patches for pthread get and set > affinity, as well as a test for

RE: Posix patchs to support affinity attribute in newlib

2014-02-27 Thread Jennifer Averett
I don't think you can make the default attributes static, as you can see in pthreadimpl.h it is used by several methods when to copy the default values into new attributes. I'll add the copyright and doc :-) > -Original Message- > From: ged...@gwmail.gwu.edu [mailto:ged...@gwmail.gwu.

Re: patch for pthread attribute get and set affinity

2014-02-27 Thread Gedare Bloom
Do you need to check if the attr->setsize == cpusetsize in setaffinity? Is it ever the case that the cpusetsize > attr->setsize in getaffinity, but that is ok? similarly in setaffinity if attr->setsize > cpusetsize? That is to say, is strict equality between the cpusetsize and the destination of C

Re: Posix patchs to support affinity attribute in newlib

2014-02-27 Thread Gedare Bloom
Since you drop const from _POSIX_Threads_Default_attributes it would be good to change it to be statically scoped in pthread.c. Please add documentation for the rtems_pthread_attribute_compare() function, and fix the copyright year (and license url) in the new pthreadattrcompare.c file. -Gedare

Re: Classic Affinity Patches

2014-02-27 Thread Gedare Bloom
Rename Cpuset_Control to CPU_set_Control. The rest looks good to me. -Gedare On Thu, Feb 27, 2014 at 8:22 AM, Jennifer Averett wrote: > > Attached are the latest classic affinity patches. > I believe all the requested modifications have > been addressed. > > Jennifer Averett > On-Line Application

Re: TCP/IP update, possible SMP (GSOC 2014)

2014-02-27 Thread Daniel Ramirez
I've seen the status page but I know Sebastian is spearheading the bulk of the work and I'm not exactly sure what would be reasonable/useful as gsoc project. What I'm specifically looking at: Migration away from task variables. Low level broadcasts. Condition variables seems like a good topic bu

pthread get attribute

2014-02-27 Thread Jennifer Averett
Attached is the modified pthread get attribute patch and its corresponding test. Jennifer Averett On-Line Applications ResearchFrom 4f74ebdf993f09993355df27a2fab784997a8733 Mon Sep 17 00:00:00 2001 From: Jennifer Averett Date: Tue, 14 Jan 2014 09:43:14 -0600 Subject: [PATCH 05/15] posix: Add pth

Patch for pthread get and set affinity

2014-02-27 Thread Jennifer Averett
Attached are patches for pthread get and set affinity, as well as a test for the new functions. Jennifer Averett On-Line Applications ResearchFrom c5d1bae56e5720232799844a76a444abad9008e3 Mon Sep 17 00:00:00 2001 From: Jennifer Averett Date: Mon, 10 Feb 2014 10:01:31 -0600 Subject: [PATCH 10/15]

patch for pthread attribute get and set affinity

2014-02-27 Thread Jennifer Averett
Attached patches are for pthread attribute get and set affinity. As well as a test for the new functions Jennifer Averett On-Line Applications ResearchFrom 16ea3cc81f9681af0c3102ef0d43720b4295cb6c Mon Sep 17 00:00:00 2001 From: Jennifer Averett Date: Thu, 6 Feb 2014 12:59:08 -0600 Subject: [PAT

Posix patchs to support affinity attribute in newlib

2014-02-27 Thread Jennifer Averett
Attached are files for posix support of the affinity attribute in pthread. The affinity methods and tests will follow. Jennifer Averett On-Line Applications ResearchFrom d4214167cc08bfe6464a719468b0f7513a90ca42 Mon Sep 17 00:00:00 2001 From: Jennifer Averett Date: Fri, 31 Jan 2014 08:54:45 -060

Classic Affinity Patches

2014-02-27 Thread Jennifer Averett
Attached are the latest classic affinity patches. I believe all the requested modifications have been addressed. Jennifer Averett On-Line Applications ResearchFrom 5b0ddb29ab7a677339ee7b2177941a06e31da423 Mon Sep 17 00:00:00 2001 From: Jennifer Averett Date: Thu, 6 Feb 2014 12:42:24 -0600 Subjec

[PATCH] bsp/leon3: Add and use cache register functions

2014-02-27 Thread Sebastian Huber
--- c/src/lib/libbsp/sparc/leon3/include/leon.h | 42 +++ c/src/lib/libbsp/sparc/leon3/smp/smp_leon3.c| 16 +--- c/src/lib/libbsp/sparc/leon3/startup/bspstart.c |9 + 3 files changed, 46 insertions(+), 21 deletions(-) diff --git a/c/src/lib/libbsp/sparc

[PATCH v2] bsp/leon3: Add L2 cache support

2014-02-27 Thread Sebastian Huber
--- c/src/lib/libbsp/sparc/leon3/include/cache_.h | 88 + 1 files changed, 88 insertions(+), 0 deletions(-) diff --git a/c/src/lib/libbsp/sparc/leon3/include/cache_.h b/c/src/lib/libbsp/sparc/leon3/include/cache_.h index eafbb48..a3f4af8 100644 --- a/c/src/lib/libbsp/sp

Re: [PATCH 2/4] score: SMP initialization and shutdown changes

2014-02-27 Thread Sebastian Huber
On 2014-02-27 09:16, Chris Johns wrote: On 26/02/2014 7:43 pm, Sebastian Huber wrote: First some words to this patch set. It is a gradual improvement of the existing SMP low-level initialization and shutdown procedure. The existing solution was able to start an SMP system. Only atomic reads/w

Re: [PATCH 2/4] score: SMP initialization and shutdown changes

2014-02-27 Thread Chris Johns
On 26/02/2014 7:43 pm, Sebastian Huber wrote: First some words to this patch set. It is a gradual improvement of the existing SMP low-level initialization and shutdown procedure. The existing solution was able to start an SMP system. Only atomic reads/writes were used. It is impossible to imp