Re: Update of libbsd to close to FreeBSD 12 release planned

2018-11-15 Thread Sebastian Huber

Hello,

I updated the libbsd to the FreeBSD head 2018-11-15.

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 2/2] rtemstoolkit/path : Add support to copy single files

2018-11-15 Thread Vijay Kumar Banerjee
On Thu, 15 Nov 2018 at 05:18, Chris Johns  wrote:

> On 15/11/2018 05:49, Vijay Kumar Banerjee wrote:
> > On Wed, 7 Nov 2018 at 13:11, Vijay Kumar Banerjee <
> vijaykumar9...@gmail.com
> > > wrote:
> >
> > ---
> >  rtemstoolkit/path.py | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/rtemstoolkit/path.py b/rtemstoolkit/path.py
> > index 760f4bd..83fb361 100644
> > --- a/rtemstoolkit/path.py
> > +++ b/rtemstoolkit/path.py
> > @@ -191,10 +191,11 @@ def copy_tree(src, dst):
> >  hsrc = host(src)
> >  hdst = host(dst)
> >
> > -if os.path.exists(src):
> > +if os.path.exists(src) and os.path.isdir(src):
> >  names = os.listdir(src)
> >  else:
> > -name = []
> > +names = [basename(src)]
> > +src = dirname(src)
> >
> >  if not os.path.isdir(dst):
> >  os.makedirs(dst)
> > --
> > 2.17.2
> >
> > ping :)
>
> OK to push.
>
> Thanks for the review!
Please push the two patches. :)

> Chris
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH v2] Add LICENSE.BSD-2-Clause

2018-11-15 Thread Sebastian Huber
Copied from:

https://spdx.org/licenses/BSD-2-Clause.html

The formatting is suitable for C/C++ source comments.

Update #3053.
---
 LICENSE.BSD-2-Clause | 26 ++
 1 file changed, 26 insertions(+)
 create mode 100644 LICENSE.BSD-2-Clause

diff --git a/LICENSE.BSD-2-Clause b/LICENSE.BSD-2-Clause
new file mode 100644
index 00..8c23038017
--- /dev/null
+++ b/LICENSE.BSD-2-Clause
@@ -0,0 +1,26 @@
+https://spdx.org/licenses/BSD-2-Clause.html
+
+SPDX-License-Identifier: BSD-2-Clause
+
+Copyright (C) ,  
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
-- 
2.16.4

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: Implementation of a new Resource Sharing Protocol

2018-11-15 Thread Malte Münch
Hello,

i am fiddling around with the mrsp-implementation for a while now. But
until now i am not able to divide the codeparts and understand what each
thing is doing. I am particularly interested in the part where the
helping mechanism is enabled. I want to replace it in a way that the
task is idling instead.

Can you give me a hint on where to look?

Thanks in advance

Malte

On 13.11.18 10:11, Sebastian Huber wrote:
> On 13/11/2018 09:58, Malte Münch wrote:
>> ok, so if i get this right _Thread_Dispatch_disable() and disabling of
>> interrupts both ensure that the current thread is not preempted and can
>> continue its spinning as it is waiting for its resource. As is seems to
>> me _Thread_Dispatch_disable is the better choice because all other
>> interrupts are processed, except they would dispatch a new thread and
>> therefore preempt the important thread.
> 
> Yes, spinning on something with interrupts disabled should be only done
> if it is unavoidable, e.g. to acquire an SMP lock. Spinning on something
> with thread dispatching disable should be also done with care.
> 
> In the MrsP implementation the spinning is done with thread dispatching
> and interrupts enabled.
> 
>>
>> Your idea, with the debugger is good, but i think i will need some time
>> to figure out how to use it. I am currently using realview_pbx_a9_qemu
>> as my board.
> 
> The realview_pbx_a9_qemu is a good target to debug sequential and
> non-timing sensitive problems.
> 
>>
>> Thanks so far.
>>
>> Malte
>> On 13.11.18 09:42, Sebastian Huber wrote:
>>> On 13/11/2018 09:37, Malte Münch wrote:
 Good morning Sebastian,

 thanks for your quick answer. Thanks for your hint on where to look for
 the locking. I think i will need some time to understand what each
 macro
 is doing.

 My plan with the rtems_task_mode() call was to start there and trace
 down to the according kernel call.
>>> Please do not look at the rtems_task_mode() function. It uses a broken
>>> mechanism:
>>>
>>> https://devel.rtems.org/ticket/2365
>>>
>>> In the operating system implementation disable interrupts to prevent a
>>> thread dispatch or use _Thread_Dispatch_disable().
>>>
 I will try this approach again with the MrsP implementation: what i
 need
 is a FIFO-queue with spinlock-waiting which is, if i am not wrong, the
 mechanism of MrsP with the exception that no priority ceiling per
 processor is involved and that no helping mechanism is used.
>>> I would use a debugger and follow the mutex obtain/release sequence in a
>>> test case to figure out what is going on.
>>>
 Best regards.

 Malte


 On 12.11.18 11:43, Sebastian Huber wrote:
> Hello Malte,
>
> On 12/11/2018 11:28, Malte Münch wrote:
>> Hi,
>>
>> i am implementing a new resource sharing protocol for RTEMS as
>> part of
>> my bachelor thesis. The thesis is about resource sharing protocols in
>> realtime environments on multicore systems. Right now i have to use a
>> spinlock for a protocol and found a helpful
>> implementation/function in
>> cpukit/include/rtems/score/smplockmcs.h. My protocol requires the
>> calling task to be non-preemptable and the comment for the
>> acquire-function requires me to disable the interrupts.
> the lock API for the operating system implementation is defined in
> . Please do not use 
> directly.
>
>> The comment in cpukit/rtems/src/taskmode.c says that it is not
>> possible
>> to change either interrupt levels or the preemptability of a task
>> in a
>> SMP configuration. Do you have a pointer for me on how to overcome
>> this
>> issue?
> You look at the wrong layer. This rtems_task_mode() is a part of the
> user API. It should not be used for the operating system
> implementation
> which deals with locking protocols.
>
> 
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Implementation of a new Resource Sharing Protocol

2018-11-15 Thread Sebastian Huber

On 15/11/2018 16:42, Malte Münch wrote:

Hello,

i am fiddling around with the mrsp-implementation for a while now. But
until now i am not able to divide the codeparts and understand what each
thing is doing. I am particularly interested in the part where the
helping mechanism is enabled. I want to replace it in a way that the
task is idling instead.


What do you mean with "task is idling"?

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Implementation of a new Resource Sharing Protocol

2018-11-15 Thread Malte Münch
I mean something like:

while (resource blocked) {
// nothing
}

instead of

while (resource blocked) {
// help other tasks
}
On 15.11.18 16:44, Sebastian Huber wrote:
> On 15/11/2018 16:42, Malte Münch wrote:
>> Hello,
>>
>> i am fiddling around with the mrsp-implementation for a while now. But
>> until now i am not able to divide the codeparts and understand what each
>> thing is doing. I am particularly interested in the part where the
>> helping mechanism is enabled. I want to replace it in a way that the
>> task is idling instead.
> 
> What do you mean with "task is idling"?
> 
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Implementation of a new Resource Sharing Protocol

2018-11-15 Thread Sebastian Huber
I think with this change you get something similar (priority inheritance 
is also disabled):


diff --git a/cpukit/include/rtems/score/mrspimpl.h 
b/cpukit/include/rtems/score/mrspimpl.h

index b9c7441401..4b69d6c68b 100644
--- a/cpukit/include/rtems/score/mrspimpl.h
+++ b/cpukit/include/rtems/score/mrspimpl.h
@@ -35,7 +35,7 @@ extern "C" {
  * @{
  */

-#define MRSP_TQ_OPERATIONS &_Thread_queue_Operations_priority_inherit
+#define MRSP_TQ_OPERATIONS &_Thread_queue_Operations_priority

 RTEMS_INLINE_ROUTINE void _MRSP_Acquire_critical(
   MRSP_Control *mrsp,

On 15/11/2018 17:02, Malte Münch wrote:

I mean something like:

while (resource blocked) {
// nothing
}

instead of

while (resource blocked) {
// help other tasks
}
On 15.11.18 16:44, Sebastian Huber wrote:

On 15/11/2018 16:42, Malte Münch wrote:

Hello,

i am fiddling around with the mrsp-implementation for a while now. But
until now i am not able to divide the codeparts and understand what each
thing is doing. I am particularly interested in the part where the
helping mechanism is enabled. I want to replace it in a way that the
task is idling instead.

What do you mean with "task is idling"?



--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Implementation of a new Resource Sharing Protocol

2018-11-15 Thread Malte Münch
ok, thanks a lot, i will have a look into that.

Best regards,

Malte

On 15.11.18 17:05, Sebastian Huber wrote:
> I think with this change you get something similar (priority inheritance
> is also disabled):
> 
> diff --git a/cpukit/include/rtems/score/mrspimpl.h
> b/cpukit/include/rtems/score/mrspimpl.h
> index b9c7441401..4b69d6c68b 100644
> --- a/cpukit/include/rtems/score/mrspimpl.h
> +++ b/cpukit/include/rtems/score/mrspimpl.h
> @@ -35,7 +35,7 @@ extern "C" {
>   * @{
>   */
> 
> -#define MRSP_TQ_OPERATIONS &_Thread_queue_Operations_priority_inherit
> +#define MRSP_TQ_OPERATIONS &_Thread_queue_Operations_priority
> 
>  RTEMS_INLINE_ROUTINE void _MRSP_Acquire_critical(
>    MRSP_Control *mrsp,
> 
> On 15/11/2018 17:02, Malte Münch wrote:
>> I mean something like:
>>
>> while (resource blocked) {
>> // nothing
>> }
>>
>> instead of
>>
>> while (resource blocked) {
>> // help other tasks
>> }
>> On 15.11.18 16:44, Sebastian Huber wrote:
>>> On 15/11/2018 16:42, Malte Münch wrote:
 Hello,

 i am fiddling around with the mrsp-implementation for a while now. But
 until now i am not able to divide the codeparts and understand what
 each
 thing is doing. I am particularly interested in the part where the
 helping mechanism is enabled. I want to replace it in a way that the
 task is idling instead.
>>> What do you mean with "task is idling"?
>>>
> 
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Added new test suite psxtmthreadattr01 -v2 (GCI 2018)

2018-11-15 Thread Himanshu Sekhar Nayak
Hi guys,

I had done some minor changes regarding variables which should matching
according to 

Thanks
Himanshu
From 009afa93edd1d00680641268e37ab6c1710c85b3 Mon Sep 17 00:00:00 2001
From: Himanshu40 
Date: Thu, 15 Nov 2018 23:23:36 +0530
Subject: [PATCH] Added new test suite psxtmthreadattr01 -v2 (GCI 2018)

---
 testsuites/psxtmtests/Makefile.am |  11 +
 testsuites/psxtmtests/configure.ac|   1 +
 testsuites/psxtmtests/psxtmtests_plan.csv |  34 +-
 .../psxtmtests/psxtmthreadattr01/init.c   | 423 ++
 .../psxtmthreadattr01/psxtmthreadattr01.doc   |  33 ++
 5 files changed, 485 insertions(+), 17 deletions(-)
 create mode 100644 testsuites/psxtmtests/psxtmthreadattr01/init.c
 create mode 100644 testsuites/psxtmtests/psxtmthreadattr01/psxtmthreadattr01.doc

diff --git a/testsuites/psxtmtests/Makefile.am b/testsuites/psxtmtests/Makefile.am
index 5af13e48a0..124f1414f7 100644
--- a/testsuites/psxtmtests/Makefile.am
+++ b/testsuites/psxtmtests/Makefile.am
@@ -569,5 +569,16 @@ psxtmthread06_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_psxtmthread06) \
 	-DOPERATION_COUNT=$(OPERATION_COUNT)
 endif
 
+if TEST_psxtmthreadattr01
+psxtm_tests += psxtmthreadattr01
+psxtm_docs += psxtmthreadattr01/psxtmthreadattr01.doc
+psxtmthreadattr01_SOURCES = psxtmthreadattr01/init.c \
+	../tmtests/include/timesys.h ../support/src/tmtests_empty_function.c \
+	../support/src/tmtests_support.c
+psxtmthreadattr01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_psxtmthreadattr01) \
+	$(support_includes) -I$(top_srcdir)/../tmtests/include \
+	-DOPERATION_COUNT=$(OPERATION_COUNT)
+endif
+
 rtems_tests_PROGRAMS = $(psxtm_tests)
 dist_rtems_tests_DATA = $(psxtm_screens) $(psxtm_docs)
diff --git a/testsuites/psxtmtests/configure.ac b/testsuites/psxtmtests/configure.ac
index 0c3b1438e0..dde3e9b879 100644
--- a/testsuites/psxtmtests/configure.ac
+++ b/testsuites/psxtmtests/configure.ac
@@ -80,6 +80,7 @@ RTEMS_TEST_CHECK([psxtmthread03])
 RTEMS_TEST_CHECK([psxtmthread04])
 RTEMS_TEST_CHECK([psxtmthread05])
 RTEMS_TEST_CHECK([psxtmthread06])
+RTEMS_TEST_CHECK([psxtmthreadattr01])
 
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
diff --git a/testsuites/psxtmtests/psxtmtests_plan.csv b/testsuites/psxtmtests/psxtmtests_plan.csv
index 6066429b74..3e31eed76d 100644
--- a/testsuites/psxtmtests/psxtmtests_plan.csv
+++ b/testsuites/psxtmtests/psxtmtests_plan.csv
@@ -45,23 +45,23 @@
 "pthread_create: no preempt","psxtmthread01","psxtmtest_single","Yes"
 "pthread_create: preempt","psxtmthread02","psxtmtest_single","Yes"
 
-"pthread_attr_init: only case", "psxtmthreadattr01", "psxtmtest_single","No"
-"pthread_attr_destroy: only case", "psxtmthreadattr01", "psxtmtest_single","No"
-"pthread_attr_getdetachstate: only case", "psxtmthreadattr01", "psxtmtest_single","No"
-"pthread_attr_getguardsize: only case", "psxtmthreadattr01", "psxtmtest_single","No"
-"pthread_attr_getinheritsched: only case", "psxtmthreadattr01", "psxtmtest_single","No"
-"pthread_attr_getschedparam: only case", "psxtmthreadattr01", "psxtmtest_single","No"
-"pthread_attr_getschedpolicy: only case", "psxtmthreadattr01", "psxtmtest_single","No"
-"pthread_attr_getscope: only case", "psxtmthreadattr01", "psxtmtest_single","No"
-"pthread_attr_getstack: only case", "psxtmthreadattr01", "psxtmtest_single","No"
-"pthread_attr_getstacksize: only case", "psxtmthreadattr01", "psxtmtest_single","No"
-"pthread_attr_setdetachstate: only case", "psxtmthreadattr01", "psxtmtest_single","No"
-"pthread_attr_setguardsize: only case", "psxtmthreadattr01", "psxtmtest_single","No"
-"pthread_attr_setinheritsched: only case", "psxtmthreadattr01", "psxtmtest_single","No"
-"pthread_attr_setschedparam: only case", "psxtmthreadattr01", "psxtmtest_single","No"
-"pthread_attr_setschedpolicy: only case", "psxtmthreadattr01", "psxtmtest_single","No"
-"pthread_attr_setscope: only case", "psxtmthreadattr01", "psxtmtest_single","No"
-"pthread_attr_setstack: only case", "psxtmthreadattr01", "psxtmtest_single","No"
+"pthread_attr_init: only case", "psxtmthreadattr01", "psxtmtest_init_destroy","Yes"
+"pthread_attr_destroy: only case", "psxtmthreadattr01", "psxtmtest_init_destroy","Yes"
+"pthread_attr_getdetachstate: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
+"pthread_attr_getguardsize: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
+"pthread_attr_getinheritsched: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
+"pthread_attr_getschedparam: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
+"pthread_attr_getschedpolicy: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
+"pthread_attr_getscope: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
+"pthread_attr_getstack: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
+"pthread_attr_getstacksize: only case", "psxtmthreadattr01", "psxtmtest_single","yes"
+"pthread_attr_setdetachstate: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
+"pthread_attr_setguardsize: only case", "psxtm

[POSIX Benchmark Test] psxtmmqrcvblock01 made (GCI 2018)

2018-11-15 Thread Shashvat Jain
hello ,
here is the patch which includes the  psxtmmqrcvblock01 test for test case
"mq_receive : not available : block"
please verify the output and the code.

Thank you

--Shashvat
From c44c4de6806aea07a1f3193831a26620c82eb699 Mon Sep 17 00:00:00 2001
From: shashvatjain 
Date: Fri, 16 Nov 2018 00:25:11 +0530
Subject: [PATCH] psxtmmqrcvblock01: Benchmark test for POSIX API (GCI 2018)

---
 testsuites/psxtmtests/Makefile.am |  12 +-
 testsuites/psxtmtests/configure.ac|   1 +
 .../psxtmtests/psxtmmqrcvblock01/init.c   | 126 ++
 .../psxtmmqrcvblock01/psxtmmqrcvblock01.doc   |  18 +++
 4 files changed, 156 insertions(+), 1 deletion(-)
 create mode 100644 testsuites/psxtmtests/psxtmmqrcvblock01/init.c
 create mode 100644 testsuites/psxtmtests/psxtmmqrcvblock01/psxtmmqrcvblock01.doc

diff --git a/testsuites/psxtmtests/Makefile.am b/testsuites/psxtmtests/Makefile.am
index 1607ac6adf..c865dff39b 100644
--- a/testsuites/psxtmtests/Makefile.am
+++ b/testsuites/psxtmtests/Makefile.am
@@ -426,6 +426,17 @@ psxtmrwlock07_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_psxtmrwlock07) \
 	-DOPERATION_COUNT=$(OPERATION_COUNT)
 endif
 
+if TEST_psxtmmqrcvblock01
+psxtm_tests += psxtmmqrcvblock01
+psxtm_docs += psxtmmqrcvblock01/psxtmmqrcvblock01.doc
+psxtmmqrcvblock01_SOURCES = psxtmmqrcvblock01/init.c \
+	../tmtests/include/timesys.h ../support/src/tmtests_empty_function.c \
+	../support/src/tmtests_support.c
+psxtmmqrcvblock01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_psxtmmqrcvblock01) \
+	$(support_includes) -I$(top_srcdir)/../tmtests/include \
+	-DOPERATION_COUNT=$(OPERATION_COUNT)
+endif
+
 if TEST_psxtmsem01
 psxtm_tests += psxtmsem01
 psxtm_docs += psxtmsem01/psxtmsem01.doc
@@ -571,4 +582,3 @@ endif
 
 rtems_tests_PROGRAMS = $(psxtm_tests)
 dist_rtems_tests_DATA = $(psxtm_screens) $(psxtm_docs)
-
diff --git a/testsuites/psxtmtests/configure.ac b/testsuites/psxtmtests/configure.ac
index 0c3b1438e0..eb088cf025 100644
--- a/testsuites/psxtmtests/configure.ac
+++ b/testsuites/psxtmtests/configure.ac
@@ -67,6 +67,7 @@ RTEMS_TEST_CHECK([psxtmrwlock04])
 RTEMS_TEST_CHECK([psxtmrwlock05])
 RTEMS_TEST_CHECK([psxtmrwlock06])
 RTEMS_TEST_CHECK([psxtmrwlock07])
+RTEMS_TEST_CHECK([psxtmmqrcvblock01])
 RTEMS_TEST_CHECK([psxtmsem01])
 RTEMS_TEST_CHECK([psxtmsem02])
 RTEMS_TEST_CHECK([psxtmsem03])
diff --git a/testsuites/psxtmtests/psxtmmqrcvblock01/init.c b/testsuites/psxtmtests/psxtmmqrcvblock01/init.c
new file mode 100644
index 00..426795c544
--- /dev/null
+++ b/testsuites/psxtmtests/psxtmmqrcvblock01/init.c
@@ -0,0 +1,126 @@
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Shashvat Jain GCI 2018
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ * 
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include 
+#include 
+#include 
+#include 
+#include "test_support.h"
+#include 
+#include 
+#include 
+#include 
+
+const char rtems_test_name[] = "PSXTMMQRCVBLOCK 01";
+
+void *POSIX_Init(void *argument);
+void *Middle(void *argument);
+void *Low(void *argument);
+
+#define MQ_MAXMSG 1
+#define MQ_MSGSIZEsizeof(int)
+
+mqd_t queue;
+int   message[MQ_MAXMSG];
+const char *q_name;
+
+void *POSIX_Init(
+  void *argument
+)
+{
+  inti;
+  intstatus;
+  intoflag= O_CREAT |O_RDWR;
+  pthread_t  threadId;
+  struct mq_attr attr;
+
+  attr.mq_maxmsg  = MQ_MAXMSG;
+  attr.mq_msgsize = MQ_MSGSIZE;
+
+  TEST_BEGIN();
+
+  for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) {
+status = pthread_create( &threadId, NULL, Middle, NULL );
+rtems_test_assert( !status );
+  }
+
+  status = pthread_create( &threadId, NULL, Low, NULL );
+  rtems_test_assert( !status );
+  
+  queue = mq_open( "queue" , oflag , 0x777, &attr );
+  
+
+  sched_yield();
+
+  benchmark_timer_initialize();
+  status = mq_receive( queue, (char *)message , MQ_MSGSIZE, 0 );
+  return NULL;
+}
+
+
+void *Middle(
+  void *argument
+)
+{
+  
+  sched_yield();
+/* let other threads run */
+
+(void) mq_receive( queue, (char *)message , MQ_MSGSIZE, 0 );
+  
+  return NULL;
+}
+
+void *Low(
+  void *argument
+)
+{
+  benchmark_timer_t end_time;
+
+  sched_yield();
+
+  end_time = benchmark_timer_read();
+
+  put_time(
+"mq_receive: not available: block",
+end_time,
+OPERATION_COUNT,
+0,
+0
+  );
+  
+  TEST_END();  
+
+  rtems_test_exit( 0 );
+  return NULL;
+}
+
+/* configuration informat

Re: [POSIX Benchmark Test] psxtmmqrcvblock01 made (GCI 2018)

2018-11-15 Thread Joel Sherrill
I am moving this on to devel to speed the process up but I see one thing
and something I need to think about.

(1) init.c has DOS (Windows CR/LF) and needs to be UNIX style.
I ran dos2unix on it.

(2) The time seems high.  Running on psim (PowerPC simulator) which
reports times in instructions, I see this:

joel@rtbf64c b-psim]$ grep e_receive log/*
log/tm09:rtems_message_queue_receive: available - 150
log/tm10:rtems_message_queue_receive: not available NO_WAIT - 88
log/tm10:rtems_message_queue_receive: not available caller blocks - 801
log/tmoverhd:overhead: rtems_message_queue_receive - 5
[joel@rtbf64c b-psim]$ grep q_receive log/*
log/psxtmmq01:mq_receive: available - 164
log/psxtmmqrcvblock01:mq_receive: not available: block - 1156

Notice that tm10's blocking case is 801 instructions vs 1156. So there are
355 more instructions on the posix case. Looking at that more closely, I
think I believe it is accurate that posix mq's are more expensive than
Classic API message queues.

I will post the patch with a couple of clean ups for further review.

--joel

On Thu, Nov 15, 2018 at 1:54 PM Shashvat Jain 
wrote:

>
>
> -- Forwarded message -
> From: Shashvat Jain 
> Date: Fri, Nov 16, 2018 at 12:32 AM
> Subject: [POSIX Benchmark Test] psxtmmqrcvblock01 made (GCI 2018)
> To: 
>
>
> hello ,
> here is the patch which includes the  psxtmmqrcvblock01 test for test case
> "mq_receive : not available : block"
> please verify the output and the code.
>
> Thank you
>
> --Shashvat
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH 2/2] psxtmmqrcvblock01: Add new POSIX timing test (GCI 2018)

2018-11-15 Thread Joel Sherrill
From: shashvatjain 

---
 testsuites/psxtmtests/Makefile.am  |  12 +-
 testsuites/psxtmtests/configure.ac |   1 +
 testsuites/psxtmtests/psxtmmqrcvblock01/init.c | 127 +
 .../psxtmmqrcvblock01/psxtmmqrcvblock01.doc|  18 +++
 4 files changed, 157 insertions(+), 1 deletion(-)
 create mode 100644 testsuites/psxtmtests/psxtmmqrcvblock01/init.c
 create mode 100644 
testsuites/psxtmtests/psxtmmqrcvblock01/psxtmmqrcvblock01.doc

diff --git a/testsuites/psxtmtests/Makefile.am 
b/testsuites/psxtmtests/Makefile.am
index ae2af47..2ef514d 100644
--- a/testsuites/psxtmtests/Makefile.am
+++ b/testsuites/psxtmtests/Makefile.am
@@ -426,6 +426,17 @@ psxtmrwlock07_CPPFLAGS = $(AM_CPPFLAGS) 
$(TEST_FLAGS_psxtmrwlock07) \
-DOPERATION_COUNT=$(OPERATION_COUNT)
 endif
 
+if TEST_psxtmmqrcvblock01
+psxtm_tests += psxtmmqrcvblock01
+psxtm_docs += psxtmmqrcvblock01/psxtmmqrcvblock01.doc
+psxtmmqrcvblock01_SOURCES = psxtmmqrcvblock01/init.c \
+   ../tmtests/include/timesys.h ../support/src/tmtests_empty_function.c \
+   ../support/src/tmtests_support.c
+psxtmmqrcvblock01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_psxtmmqrcvblock01) \
+   $(support_includes) -I$(top_srcdir)/../tmtests/include \
+   -DOPERATION_COUNT=$(OPERATION_COUNT)
+endif
+
 if TEST_psxtmsem01
 psxtm_tests += psxtmsem01
 psxtm_docs += psxtmsem01/psxtmsem01.doc
@@ -582,4 +593,3 @@ endif
 
 rtems_tests_PROGRAMS = $(psxtm_tests)
 dist_rtems_tests_DATA = $(psxtm_screens) $(psxtm_docs)
-
diff --git a/testsuites/psxtmtests/configure.ac 
b/testsuites/psxtmtests/configure.ac
index dde3e9b..4b5921f 100644
--- a/testsuites/psxtmtests/configure.ac
+++ b/testsuites/psxtmtests/configure.ac
@@ -67,6 +67,7 @@ RTEMS_TEST_CHECK([psxtmrwlock04])
 RTEMS_TEST_CHECK([psxtmrwlock05])
 RTEMS_TEST_CHECK([psxtmrwlock06])
 RTEMS_TEST_CHECK([psxtmrwlock07])
+RTEMS_TEST_CHECK([psxtmmqrcvblock01])
 RTEMS_TEST_CHECK([psxtmsem01])
 RTEMS_TEST_CHECK([psxtmsem02])
 RTEMS_TEST_CHECK([psxtmsem03])
diff --git a/testsuites/psxtmtests/psxtmmqrcvblock01/init.c 
b/testsuites/psxtmtests/psxtmmqrcvblock01/init.c
new file mode 100644
index 000..c4b6b84
--- /dev/null
+++ b/testsuites/psxtmtests/psxtmmqrcvblock01/init.c
@@ -0,0 +1,127 @@
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Shashvat Jain GCI 2018
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 
SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include 
+#include 
+#include 
+#include 
+#include "test_support.h"
+#include 
+#include 
+#include 
+#include 
+
+const char rtems_test_name[] = "PSXTMMQRCVBLOCK 01";
+
+void *POSIX_Init(void *argument);
+void *Middle(void *argument);
+void *Low(void *argument);
+
+#define MQ_MAXMSG 1
+#define MQ_MSGSIZEsizeof(int)
+
+mqd_t queue;
+int   message[MQ_MAXMSG];
+const char *q_name;
+
+void *POSIX_Init(
+  void *argument
+)
+{
+  inti;
+  intstatus;
+  intoflag= O_CREAT |O_RDWR;
+  pthread_t  threadId;
+  struct mq_attr attr;
+
+  attr.mq_maxmsg  = MQ_MAXMSG;
+  attr.mq_msgsize = MQ_MSGSIZE;
+
+  TEST_BEGIN();
+
+  for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) {
+status = pthread_create( &threadId, NULL, Middle, NULL );
+rtems_test_assert( !status );
+  }
+
+  status = pthread_create( &threadId, NULL, Low, NULL );
+  rtems_test_assert( !status );
+
+  queue = mq_open( "queue" , oflag , 0x777, &attr );
+
+  /* let other threads run */
+  sched_yield();
+
+  /* now run the benchmark */
+  benchmark_timer_initialize();
+  status = mq_receive( queue, (char *)message , MQ_MSGSIZE, 0 );
+  return NULL;
+}
+
+
+void *Middle(
+  void *argument
+)
+{
+  sched_yield();
+
+/* let other threads run */
+
+(void) mq_receive( queue, (char *)message , MQ_MSGSIZE, 0 );
+
+  return NULL;
+}
+
+void *Low(
+  void *argument
+)
+{
+  benchmark_timer_t end_time;
+
+  sched_yield();
+
+  end_time = benchmark_timer_read();
+
+  put_time(
+"mq_receive: not available: block",
+end_time,
+OPERATION_COUNT,
+0,
+0
+  );
+
+  TEST_END();
+
+  rtems_test_exit( 0 );
+  return NULL;
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
+
+#define CONFIGURE_MAXIMUM_POSIX_THREADS OPERATION_COUNT + 2
+#define CONFIGURE_POSIX_INIT_THREAD_TABLE
+
+#define CONFIGURE_INIT
+
+#include 
+  /* end of

[PATCH 1/2] psxtmthreadattr01: Add new POSIX timing test (GCI 2018)

2018-11-15 Thread Joel Sherrill
From: Himanshu40 

---
 testsuites/psxtmtests/Makefile.am  |  11 +
 testsuites/psxtmtests/configure.ac |   1 +
 testsuites/psxtmtests/psxtmtests_plan.csv  |  34 +-
 testsuites/psxtmtests/psxtmthreadattr01/init.c | 423 +
 .../psxtmthreadattr01/psxtmthreadattr01.doc|  33 ++
 5 files changed, 485 insertions(+), 17 deletions(-)
 create mode 100644 testsuites/psxtmtests/psxtmthreadattr01/init.c
 create mode 100644 
testsuites/psxtmtests/psxtmthreadattr01/psxtmthreadattr01.doc

diff --git a/testsuites/psxtmtests/Makefile.am 
b/testsuites/psxtmtests/Makefile.am
index 1607ac6..ae2af47 100644
--- a/testsuites/psxtmtests/Makefile.am
+++ b/testsuites/psxtmtests/Makefile.am
@@ -569,6 +569,17 @@ psxtmthread06_CPPFLAGS = $(AM_CPPFLAGS) 
$(TEST_FLAGS_psxtmthread06) \
-DOPERATION_COUNT=$(OPERATION_COUNT)
 endif
 
+if TEST_psxtmthreadattr01
+psxtm_tests += psxtmthreadattr01
+psxtm_docs += psxtmthreadattr01/psxtmthreadattr01.doc
+psxtmthreadattr01_SOURCES = psxtmthreadattr01/init.c \
+   ../tmtests/include/timesys.h ../support/src/tmtests_empty_function.c \
+   ../support/src/tmtests_support.c
+psxtmthreadattr01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_psxtmthreadattr01) \
+   $(support_includes) -I$(top_srcdir)/../tmtests/include \
+   -DOPERATION_COUNT=$(OPERATION_COUNT)
+endif
+
 rtems_tests_PROGRAMS = $(psxtm_tests)
 dist_rtems_tests_DATA = $(psxtm_screens) $(psxtm_docs)
 
diff --git a/testsuites/psxtmtests/configure.ac 
b/testsuites/psxtmtests/configure.ac
index 0c3b143..dde3e9b 100644
--- a/testsuites/psxtmtests/configure.ac
+++ b/testsuites/psxtmtests/configure.ac
@@ -80,6 +80,7 @@ RTEMS_TEST_CHECK([psxtmthread03])
 RTEMS_TEST_CHECK([psxtmthread04])
 RTEMS_TEST_CHECK([psxtmthread05])
 RTEMS_TEST_CHECK([psxtmthread06])
+RTEMS_TEST_CHECK([psxtmthreadattr01])
 
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
diff --git a/testsuites/psxtmtests/psxtmtests_plan.csv 
b/testsuites/psxtmtests/psxtmtests_plan.csv
index 68c27af..5bfb56d 100644
--- a/testsuites/psxtmtests/psxtmtests_plan.csv
+++ b/testsuites/psxtmtests/psxtmtests_plan.csv
@@ -28,23 +28,23 @@
 
 "pthread_create: no preempt","psxtmthread01","psxtmtest_single","Yes"
 "pthread_create: preempt","psxtmthread02","psxtmtest_single","Yes"
-"pthread_attr_init: only case", "psxtmthread07", "psxtmtest_single","No"
-"pthread_attr_destroy: only case", "psxtmthread07", "psxtmtest_single","No"
-"pthread_attr_getdetachstate: only case", "psxtmthread07", 
"psxtmtest_single","No"
-"pthread_attr_getguardsize: only case", "psxtmthread07", 
"psxtmtest_single","No"
-"pthread_attr_getinheritsched: only case", "psxtmthread07", 
"psxtmtest_single","No"
-"pthread_attr_getschedparam: only case", "psxtmthread07", 
"psxtmtest_single","No"
-"pthread_attr_getschedpolicy: only case", "psxtmthread07", 
"psxtmtest_single","No"
-"pthread_attr_getscope: only case", "psxtmthread07", "psxtmtest_single","No"
-"pthread_attr_getstack: only case", "psxtmthread07", "psxtmtest_single","No"
-"pthread_attr_getstacksize: only case", "psxtmthread07", 
"psxtmtest_single","No"
-"pthread_attr_setdetachstate: only case", "psxtmthread07", 
"psxtmtest_single","No"
-"pthread_attr_setguardsize: only case", "psxtmthread07", 
"psxtmtest_single","No"
-"pthread_attr_setinheritsched: only case", "psxtmthread07", 
"psxtmtest_single","No"
-"pthread_attr_setschedparam: only case", "psxtmthread07", 
"psxtmtest_single","No"
-"pthread_attr_setschedpolicy: only case", "psxtmthread07", 
"psxtmtest_single","No"
-"pthread_attr_setscope: only case", "psxtmthread07", "psxtmtest_single","No"
-"pthread_attr_setstack: only case", "psxtmthread07", "psxtmtest_single","No"
+"pthread_attr_init: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
+"pthread_attr_destroy: only case", "psxtmthreadattr01", 
"psxtmtest_single","Yes"
+"pthread_attr_getdetachstate: only case", "psxtmthreadattr01", 
"psxtmtest_single","Yes"
+"pthread_attr_getguardsize: only case", "psxtmthreadattr01", 
"psxtmtest_single","Yes"
+"pthread_attr_getinheritsched: only case", "psxtmthreadattr01", 
"psxtmtest_single","Yes"
+"pthread_attr_getschedparam: only case", "psxtmthreadattr01", 
"psxtmtest_single","Yes"
+"pthread_attr_getschedpolicy: only case", "psxtmthreadattr01", 
"psxtmtest_single","Yes"
+"pthread_attr_getscope: only case", "psxtmthreadattr01", 
"psxtmtest_single","Yes"
+"pthread_attr_getstack: only case", "psxtmthreadattr01", 
"psxtmtest_single","Yes"
+"pthread_attr_getstacksize: only case", "psxtmthreadattr01", 
"psxtmtest_single","Yes"
+"pthread_attr_setdetachstate: only case", "psxtmthreadattr01", 
"psxtmtest_single","Yes"
+"pthread_attr_setguardsize: only case", "psxtmthreadattr01", 
"psxtmtest_single","Yes"
+"pthread_attr_setinheritsched: only case", "psxtmthreadattr01", 
"psxtmtest_single","Yes"
+"pthread_attr_setschedparam: only case", "psxtmthreadattr01", 
"psxtmtest_single","Yes"
+"pthread_attr_setschedpolicy: only case", "psxtmthreadattr01", 
"psxtmtest_single",

RTEMS 5 Release Branching

2018-11-15 Thread Joel Sherrill
Hi

I know the technical answer is "when all the tickets are closed" but
can we put a firmer answer on this?

Chris and I pushed to close tickets a few weeks ago while we were
together at the mentor summit. But there are still more.

What can we do to push this release out?

Thanks.

--joel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Added psxtmthreadattr01 timing test suite -v3 (GCI 2018)

2018-11-15 Thread Himanshu Sekhar Nayak
Hi guys,
Here is the patch generated.

Thanks
Himanshu
From ae597305822f734d36ed678b15cfb353962fbd2c Mon Sep 17 00:00:00 2001
From: Himanshu40 
Date: Fri, 16 Nov 2018 03:25:41 +0530
Subject: [PATCH] Add psxtmthreadattr01 timing test suite(GCI 2018)

---
 testsuites/psxtmtests/psxtmtests_plan.csv |  8 ---
 .../psxtmtests/psxtmthreadattr01/init.c   | 22 +--
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/testsuites/psxtmtests/psxtmtests_plan.csv b/testsuites/psxtmtests/psxtmtests_plan.csv
index 5bfb56d711..25beefbc4b 100644
--- a/testsuites/psxtmtests/psxtmtests_plan.csv
+++ b/testsuites/psxtmtests/psxtmtests_plan.csv
@@ -28,8 +28,9 @@
 
 "pthread_create: no preempt","psxtmthread01","psxtmtest_single","Yes"
 "pthread_create: preempt","psxtmthread02","psxtmtest_single","Yes"
-"pthread_attr_init: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
-"pthread_attr_destroy: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
+
+"pthread_attr_init: only case", "psxtmthreadattr01", "psxtmtest_init_destroy","Yes"
+"pthread_attr_destroy: only case", "psxtmthreadattr01", "psxtmtest_init_destroy","Yes"
 "pthread_attr_getdetachstate: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
 "pthread_attr_getguardsize: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
 "pthread_attr_getinheritsched: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
@@ -37,7 +38,7 @@
 "pthread_attr_getschedpolicy: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
 "pthread_attr_getscope: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
 "pthread_attr_getstack: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
-"pthread_attr_getstacksize: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
+"pthread_attr_getstacksize: only case", "psxtmthreadattr01", "psxtmtest_single","yes"
 "pthread_attr_setdetachstate: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
 "pthread_attr_setguardsize: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
 "pthread_attr_setinheritsched: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
@@ -46,6 +47,7 @@
 "pthread_attr_setscope: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
 "pthread_attr_setstack: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
 
+
 "pthread_join"
 "pthread_detach"
 "pthread_exit"
diff --git a/testsuites/psxtmtests/psxtmthreadattr01/init.c b/testsuites/psxtmtests/psxtmthreadattr01/init.c
index 811f973ba1..68b7d7d38d 100644
--- a/testsuites/psxtmtests/psxtmthreadattr01/init.c
+++ b/testsuites/psxtmtests/psxtmthreadattr01/init.c
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+
 #define GUARDSIZE_TEST_VALUE 512
 #define STACKSIZE_TEST_VALUE 1024
 
@@ -37,7 +38,6 @@ static pthread_attr_t attr;
 static size_t guardsize = GUARDSIZE_TEST_VALUE;
 static size_t stacksize = STACKSIZE_TEST_VALUE;
 static struct sched_param param;
-static int var = 2;
 static void *stackaddr;
 
 static void benchmark_create_pthread_attr(void)
@@ -84,13 +84,13 @@ static void benchmark_pthread_attr_getdetachstate(void)
 {
   benchmark_timer_t end_time;
   int  status;
-  int tmp_var;
+  int detachstate;
 
   benchmark_timer_initialize();
-  status = pthread_attr_getdetachstate(&attr, &tmp_var);
+  status = pthread_attr_getdetachstate(&attr, &detachstate);
   end_time = benchmark_timer_read();
   rtems_test_assert( status == 0 );
-  rtems_test_assert( tmp_var == PTHREAD_CREATE_DETACHED );
+  rtems_test_assert( detachstate == PTHREAD_CREATE_DETACHED );
 
   put_time(
 "pthread_attr_getdetachstate: only case",
@@ -168,13 +168,13 @@ static void benchmark_pthread_attr_getinheritsched(void)
 {
   benchmark_timer_t end_time;
   int  status;
-  int tmp_var;
+  int inheritsched;
 
   benchmark_timer_initialize();
-  status = pthread_attr_getinheritsched(&attr, &tmp_var);
+  status = pthread_attr_getinheritsched(&attr, &inheritsched);
   end_time = benchmark_timer_read();
   rtems_test_assert( status == 0 );
-  rtems_test_assert( tmp_var == PTHREAD_EXPLICIT_SCHED );
+  rtems_test_assert( inheritsched == PTHREAD_EXPLICIT_SCHED );
 
   put_time(
 "pthread_attr_getinheritsched: only case",
@@ -240,7 +240,7 @@ static void benchmark_pthread_attr_setschedpolicy(void)
   int  status;
 
   benchmark_timer_initialize();
-  status = pthread_attr_setschedpolicy(&attr, var);
+  status = pthread_attr_setschedpolicy(&attr, SCHED_RR);
   end_time = benchmark_timer_read();
   rtems_test_assert( status == 0 );
 
@@ -258,13 +258,13 @@ static void benchmark_pthread_attr_getschedpolicy(void)
 {
   benchmark_timer_t end_time;
   int  status;
-  int tmp_var;
+  int policy;
 
   benchmark_timer_initialize();
-  status = pthread_attr_getschedpolicy(&attr, &tmp_var);
+  status = pthread_attr_getschedpolicy(&attr, &policy);
   end_time = benchmark_timer_read();
   rtems_test_assert( status == 0 );
-  rtems_test_assert( tmp_var == var );
+  rtems_test_assert( policy == SCHED_RR );
 
   put_time(
 "

Re: RTEMS 5 Release Branching

2018-11-15 Thread Chris Johns
On 16/11/2018 08:29, Joel Sherrill wrote:
> 
> I know the technical answer is "when all the tickets are closed" but 
> can we put a firmer answer on this?

We need to wait for FreeBSD 12 to release then some time after for any changes
to libbsd to happen.

I need to modify the RSB to fetch all source not just the host I run the release
fetch on. We need to fetch and capture all source for all hosts. This is a
tricky problem and I am not yet sure how I will do this.

> Chris and I pushed to close tickets a few weeks ago while we were
> together at the mentor summit. But there are still more.

The FreeBSd release is 4 Dec 2018 and this leaves us only a few weeks before the
end of the year. We might be able to make a release but it will be tight.

> What can we do to push this release out?

I have made the ticket #2962 [1] a blocker. We need to have a baseline for the
BSPs and the testing environment we use. We will ship with some tests that are
not working, that is a fact of life, so lets flag these so users can see what is
expected to work and what is not expected to work.

Chris

[1] https://devel.rtems.org/ticket/2962
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Improve English for source code (GCI'18)

2018-11-15 Thread mehr sachal
Kindly make sure some changes do not misguide the reader (line# 545).
A patch file is attached to the email.

In case you find this email in spam, kindly whitelist this email address.

Regards,
Mehr Mohammad Sachal
From 8b0b6fcc98a89b58773981392d1e4fdb73ba0157 Mon Sep 17 00:00:00 2001
From: mehrsachal 
Date: Fri, 16 Nov 2018 09:02:38 +0500
Subject: [PATCH] GCI'18 (Improve English for source code)

---
 cpukit/Doxyfile.in | 32 
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/cpukit/Doxyfile.in b/cpukit/Doxyfile.in
index 8a66d22937..acd0983be6 100644
--- a/cpukit/Doxyfile.in
+++ b/cpukit/Doxyfile.in
@@ -57,7 +57,7 @@ CREATE_SUBDIRS = NO
 # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
 # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
 # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
 # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
 
 OUTPUT_LANGUAGE= English
@@ -79,7 +79,7 @@ REPEAT_BRIEF   = YES
 # This tag implements a quasi-intelligent brief description abbreviator
 # that is used to form the text in various listings. Each string
 # in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
+# stripped from the text and the result after processing the whole list is
 # used as the annotated text. Otherwise, the brief description is used as-is.
 # If left blank, the following values are used ("$name" is automatically
 # replaced with the name of the entity): "The $name class" "The $name widget"
@@ -222,7 +222,7 @@ EXTENSION_MAPPING  =
 # to include (a tag file for) the STL sources as input, then you should
 # set this tag to YES in order to let doxygen match functions declarations and
 # definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also make the inheritance and collaboration
+# func(std::string) {}). This also makes the inheritance and collaboration
 # diagrams that involve STL classes more complete and accurate.
 
 BUILTIN_STL_SUPPORT= NO
@@ -276,12 +276,12 @@ TYPEDEF_HIDES_STRUCT   = NO
 # determine which symbols to keep in memory and which to flush to disk.
 # When the cache is full, less often used symbols will be written to disk.
 # For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
+# probably good enough. For larger projects, a too small cache size can cause
 # doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penality.
+# causing a significant performance penalty.
 # If the system has enough physical memory increasing the cache will improve 
the
 # performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will rougly double the
+# a logarithmic scale so increasing the size by one will roughly double the
 # memory usage. The cache size is given by this formula:
 # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
 # corresponding to a cache size of 2^16 = 65536 symbols
@@ -324,7 +324,7 @@ EXTRACT_LOCAL_METHODS  = NO
 
 # If this flag is set to YES, the members of anonymous namespaces will be
 # extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
+# 'anonymous_namespace{file}', where the file will be replaced with the base
 # name of the file that contains the anonymous namespace. By default
 # anonymous namespace are hidden.
 
@@ -542,7 +542,7 @@ WARN_IF_UNDOCUMENTED   = YES
 
 WARN_IF_DOC_ERROR  = YES
 
-# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for
 # functions that are documented, but have no documentation for their parameters
 # or return value. If set to NO (the default) doxygen will only warn about
 # wrong or incomplete parameter documentation, but not about the absence of
@@ -595,7 +595,7 @@ FILE_PATTERNS  = *.h \
  *.inl \
 *.c
 
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# The RECURSIVE tag can be used to turn to specify whether or not 
subdirectories
 # should be searched for input files as well. Possible values are YES and NO.
 # If left blank NO is used.
 
@@ -616,7 +616,7 @@ EXCLUDE_SYMLINKS   = NO
 # If the value of the INPUT tag contains directories, you can use the
 # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
 # certain files from those directories. Note that the wildca

[PATCH] score: Remove support for RTEMS_USE_16_BIT_OBJECT

2018-11-15 Thread Sebastian Huber
The RTEMS_USE_16_BIT_OBJECT define is not set by an RTEMS port.  Remove
support for 16-bit object identifiers.  If someone really wants to use
RTEMS on a 16-bit target, then it is better to use self-contained
objects instead of playing around with object identifier optimizations.

Update #3603.
---
 cpukit/include/rtems/inttypes.h |  4 ---
 cpukit/include/rtems/score/object.h | 51 ++---
 cpukit/libmisc/monitor/mon-driver.c |  4 ---
 cpukit/libmisc/monitor/mon-prmisc.c |  4 ---
 4 files changed, 2 insertions(+), 61 deletions(-)

diff --git a/cpukit/include/rtems/inttypes.h b/cpukit/include/rtems/inttypes.h
index a8e725dcbf..f409b47b07 100644
--- a/cpukit/include/rtems/inttypes.h
+++ b/cpukit/include/rtems/inttypes.h
@@ -97,11 +97,7 @@ extern "C" {
  * certain system types on different targets.
  */
 
-#if defined(RTEMS_USE_16_BIT_OBJECT)
 #define PRIxrtems_id PRIx16
-#else
-#define PRIxrtems_id PRIx32
-#endif
 
 /* c.f. cpukit/score/include/rtems/score/priority.h */
 #define PRIdPriority_Control PRIu64
diff --git a/cpukit/include/rtems/score/object.h 
b/cpukit/include/rtems/score/object.h
index 9c2699dbcb..7c2436c928 100644
--- a/cpukit/include/rtems/score/object.h
+++ b/cpukit/include/rtems/score/object.h
@@ -61,42 +61,6 @@ typedef union {
   uint32_tname_u32;
 } Objects_Name;
 
-#if defined(RTEMS_USE_16_BIT_OBJECT)
-/**
- *  The following type defines the control block used to manage
- *  object IDs.  The format is as follows (0=LSB):
- *
- * Bits  0 ..  7= index  (up to 254 objects of a type)
- * Bits  8 .. 10= API(up to 7 API classes)
- * Bits 11 .. 15= class  (up to 31 object types per API)
- */
-typedef uint16_t   Objects_Id;
-
-/**
- * This type is used to store the maximum number of allowed objects
- * of each type.
- */
-typedef uint8_tObjects_Maximum;
-
-#define OBJECTS_INDEX_START_BIT  0U
-#define OBJECTS_API_START_BIT8U
-#define OBJECTS_CLASS_START_BIT 11U
-
-#define OBJECTS_INDEX_MASK  (Objects_Id)0x00ffU
-#define OBJECTS_API_MASK(Objects_Id)0x0700U
-#define OBJECTS_CLASS_MASK  (Objects_Id)0xF800U
-
-#define OBJECTS_INDEX_VALID_BITS  (Objects_Id)0x00ffU
-#define OBJECTS_API_VALID_BITS(Objects_Id)0x0007U
-/* OBJECTS_NODE_VALID_BITS should not be used with 16 bit Ids */
-#define OBJECTS_CLASS_VALID_BITS  (Objects_Id)0x001fU
-
-#define OBJECTS_UNLIMITED_OBJECTS 0x8000U
-
-#define OBJECTS_ID_INITIAL_INDEX  (0)
-#define OBJECTS_ID_FINAL_INDEX(0xff)
-
-#else
 /**
  *  The following type defines the control block used to manage
  *  object IDs.  The format is as follows (0=LSB):
@@ -196,7 +160,6 @@ typedef uint16_t   Objects_Maximum;
  *  This is the highest value for the index portion of an object Id.
  */
 #define OBJECTS_ID_FINAL_INDEX(0xU)
-#endif
 
 /**
  *  This enumerated type is used in the class field of the object ID.
@@ -313,15 +276,7 @@ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_node(
   Objects_Id id
 )
 {
-  /*
-   * If using 16-bit Ids, then there is no node field and it MUST
-   * be a single processor system.
-   */
-  #if defined(RTEMS_USE_16_BIT_OBJECT)
-return 1;
-  #else
-return (id >> OBJECTS_NODE_START_BIT) & OBJECTS_NODE_VALID_BITS;
-  #endif
+  return (id >> OBJECTS_NODE_START_BIT) & OBJECTS_NODE_VALID_BITS;
 }
 
 /**
@@ -361,9 +316,7 @@ RTEMS_INLINE_ROUTINE Objects_Id _Objects_Build_id(
 {
   return (( (Objects_Id) the_api )   << OBJECTS_API_START_BIT)   |
  (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
- #if !defined(RTEMS_USE_16_BIT_OBJECT)
-   (( (Objects_Id) node )<< OBJECTS_NODE_START_BIT)  |
- #endif
+ (( (Objects_Id) node )<< OBJECTS_NODE_START_BIT)  |
  (( (Objects_Id) index ) << OBJECTS_INDEX_START_BIT);
 }
 
diff --git a/cpukit/libmisc/monitor/mon-driver.c 
b/cpukit/libmisc/monitor/mon-driver.c
index f10b8c9e45..e2e95ff23a 100644
--- a/cpukit/libmisc/monitor/mon-driver.c
+++ b/cpukit/libmisc/monitor/mon-driver.c
@@ -107,11 +107,7 @@ rtems_monitor_driver_dump(
 {
 uint32_tlength = 0;
 
-#if defined(RTEMS_USE_16_BIT_OBJECT)
-length += fprintf(stdout,"  %" PRId16 "", monitor_driver->id);
-#else
 length += fprintf(stdout,"  %" PRId32 "", monitor_driver->id);
-#endif
 length += rtems_monitor_pad(13, length);
 length += fprintf(stdout,"init: ");
 length += rtems_monitor_symbol_dump(&monitor_driver->initialization, 
verbose);
diff --git a/cpukit/libmisc/monitor/mon-prmisc.c 
b/cpukit/libmisc/monitor/mon-prmisc.c
index ecf17b08b7..97862ff22c 100644
--- a/cpukit/libmisc/monitor/mon-prmisc.c
+++ b/cpukit/libmisc/monitor/mon-prmisc.c
@@ -88,11 +88,7 @@ rtems_monitor_dump_assoc_bitfield(
 int
 rtems_monitor_dump_id(rtems_id id)
 {
-#if defined(RTEMS_USE_16_BIT_OBJECT)
-return fprintf(stdout,"%08" PRIx16, id);
-#else
 return fprintf(stdout,"%08" PRIx32, id);
-#endif
 }
 
 int
-- 
2.16.4

___
devel mailing li

[PATCH] c-user: Remove 16-bit object identifiers

2018-11-15 Thread Sebastian Huber
Close #3603.
---
 c-user/key_concepts.rst | 44 
 1 file changed, 8 insertions(+), 36 deletions(-)

diff --git a/c-user/key_concepts.rst b/c-user/key_concepts.rst
index f717a87..25f9249 100644
--- a/c-user/key_concepts.rst
+++ b/c-user/key_concepts.rst
@@ -94,19 +94,14 @@ name:
 Object IDs
 --
 
-An object ID is a unique unsigned integer value which uniquely identifies an
-object instance.  Object IDs are passed as arguments to many directives in
-RTEMS and RTEMS translates the ID to an internal object pointer. The efficient
-manipulation of object IDs is critical to the performance of RTEMS services.
-Because of this, there are two object Id formats defined.  Each target
-architecture specifies which format it will use.  There is a thirty-two bit
-format which is used for most of the supported architectures and supports
-multiprocessor configurations.  There is also a simpler sixteen bit format
-which is appropriate for smaller target architectures and does not support
-multiprocessor configurations.
-
-Thirty-Two Object ID Format
-~~~
+An object ID is a unique 32-bit unsigned integer value which uniquely
+identifies an object instance.  Object IDs are passed as arguments to many
+directives in RTEMS and RTEMS translates the ID to an internal object pointer.
+The efficient manipulation of object IDs is critical to the performance of some
+RTEMS services.
+
+Object ID Format
+
 
 The thirty-two bit format for an object ID is composed of four parts: API,
 object class, node, and index.  The data type ``rtems_id`` is used to store
@@ -129,29 +124,6 @@ sixteen bits form an identifier within a particular object 
type.  This
 identifier, called the object index, ranges in value from 1 to the maximum
 number of objects configured for this object type.
 
-Sixteen Bit Object ID Format
-
-
-The sixteen bit format for an object ID is composed of three parts: API, object
-class, and index.  The data type ``rtems_id`` is used to store object IDs.
-
-.. code-block:: c
-
-15  11 108 70
-+-+---+--+
-| |   |  |
-|  Class  |  API  |Index |
-| |   |  |
-+-+---+--+
-
-The sixteen-bit format is designed to be as similar as possible to the
-thrity-two bit format.  The differences are limited to the eliminatation of the
-node field and reduction of the index field from sixteen-bits to 8-bits.  Thus
-the sixteen bit format only supports up to 255 object instances per API/Class
-combination and single processor systems.  As this format is typically utilized
-by sixteen-bit processors with limited address space, this is more than enough
-object instances.
-
 Object ID Description
 -
 
-- 
2.16.4

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [POSIX Benchmark Test] psxtmmqrcvblock01 made (GCI 2018)

2018-11-15 Thread Sebastian Huber
Do we really need separate test programs for all these test cases? Can't 
we just add this to psxtmmq01?


The reason for this is that it needs time to load a test program to the 
target.


--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel