Re: [PATCH] Fix exception handler for supporting FPU

2015-10-07 Thread Chris Johns
On 7/10/2015 4:33 pm, Sebastian Huber wrote:
> 
> 
> On 07/10/15 05:13, Chris Johns wrote:
>> On 23/09/2015 11:33 am, Gedare Bloom wrote:
>>> >ping. i will try to get to this tomorrow if no one else does.
>> What happened to this change?
> 
> https://lists.rtems.org/pipermail/devel/2015-September/012612.html
> 

Ah yes I remember now and why I could not find them on 4.11 branch. Are
they ok for 4.11?

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


Re: [PATCH] Fix exception handler for supporting FPU

2015-10-07 Thread Sebastian Huber



On 07/10/15 09:04, Chris Johns wrote:

On 7/10/2015 4:33 pm, Sebastian Huber wrote:

>
>
>On 07/10/15 05:13, Chris Johns wrote:

>>On 23/09/2015 11:33 am, Gedare Bloom wrote:

>>> >ping. i will try to get to this tomorrow if no one else does.

>>What happened to this change?

>
>https://lists.rtems.org/pipermail/devel/2015-September/012612.html
>

Ah yes I remember now and why I could not find them on 4.11 branch. Are
they ok for 4.11?


I don't know. I wait for feedback.

--
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] Fix exception handler for supporting FPU

2015-10-07 Thread Daniel Gutson
On Wed, Oct 7, 2015 at 4:05 AM, Sebastian Huber
 wrote:
>
>
> On 07/10/15 09:04, Chris Johns wrote:
>>
>> On 7/10/2015 4:33 pm, Sebastian Huber wrote:
>>>
>>> >
>>> >
>>> >On 07/10/15 05:13, Chris Johns wrote:

 >>On 23/09/2015 11:33 am, Gedare Bloom wrote:
>>
>> >>> >ping. i will try to get to this tomorrow if no one else does.

 >>What happened to this change?
>>>
>>> >
>>> >https://lists.rtems.org/pipermail/devel/2015-September/012612.html
>>> >
>>
>> Ah yes I remember now and why I could not find them on 4.11 branch. Are
>> they ok for 4.11?
>
>
> I don't know. I wait for feedback.

FWIW no need from feedback from us.

>
> --
> 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



-- 

Daniel F. Gutson
Chief Engineering Officer, SPD

San Lorenzo 47, 3rd Floor, Office 5
Córdoba, Argentina

Phone:   +54 351 4217888 / +54 351 4218211
Skype:dgutson
LinkedIn: http://ar.linkedin.com/in/danielgutson
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 3/3] C11 threads support

2015-10-07 Thread Joel Sherrill



On 10/7/2015 5:04 PM, Jeff Johnston wrote:

I am ok with this although I would like to hear that at least RTEMS or another 
configuration
supports or plans to support threads.h and functions.  C11 says that the flag 
__STDC_NO_THREADS__
can be used to indicate that threads.h and the functions are missing.



RTEMS has support for C11 threads as well as C++11 threads. The work
may not be 100% complete at the moment but it is getting there.

FWIW Sebastian has run OpenMP on a 24-core PowerPC RTEMS system and
after some optimizations in the target specific adapter code, it
performs very well.

If I understated or overstated, I am sure Sebastian will correct me but
things are looking good for C11 and C++11 and RTEMS.

--joel


-- Jeff J.

- Original Message -

Import  from latest FreeBSD.  Move types and defines to
 so that it can be customized per target.

newlib/ChangeLog
2015-09-21  Sebastian Huber  

* libc/include/threads.h: New.
* libc/sys/rtems/include/machine/_threads.h: Likewise.
---
  newlib/libc/include/threads.h| 93
  
  newlib/libc/sys/rtems/include/machine/_threads.h | 54 ++
  2 files changed, 147 insertions(+)
  create mode 100644 newlib/libc/include/threads.h
  create mode 100644 newlib/libc/sys/rtems/include/machine/_threads.h

diff --git a/newlib/libc/include/threads.h b/newlib/libc/include/threads.h
new file mode 100644
index 000..9fb08b0
--- /dev/null
+++ b/newlib/libc/include/threads.h
@@ -0,0 +1,93 @@
+/*-
+ * Copyright (c) 2011 Ed Schouten 
+ * All rights reserved.
+ *
+ * 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 AUTHOR 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 AUTHOR 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.
+ */
+
+#ifndef _THREADS_H_
+#define_THREADS_H_
+
+#include 
+#include 
+
+typedef void (*tss_dtor_t)(void *);
+typedef int (*thrd_start_t)(void *);
+
+enum {
+   mtx_plain = 0x1,
+   mtx_recursive = 0x2,
+   mtx_timed = 0x4
+};
+
+enum {
+   thrd_busy = 1,
+   thrd_error = 2,
+   thrd_nomem = 3,
+   thrd_success = 4,
+   thrd_timedout = 5
+};
+
+#if !defined(__cplusplus) || __cplusplus < 201103L
+#definethread_local_Thread_local
+#endif
+
+__BEGIN_DECLS
+void   call_once(once_flag *, void (*)(void));
+intcnd_broadcast(cnd_t *);
+void   cnd_destroy(cnd_t *);
+intcnd_init(cnd_t *);
+intcnd_signal(cnd_t *);
+intcnd_timedwait(cnd_t *__restrict, mtx_t *__restrict __mtx,
+const struct timespec *__restrict)
+__requires_exclusive(*__mtx);
+intcnd_wait(cnd_t *, mtx_t *__mtx)
+__requires_exclusive(*__mtx);
+void   mtx_destroy(mtx_t *__mtx)
+__requires_unlocked(*__mtx);
+intmtx_init(mtx_t *__mtx, int)
+__requires_unlocked(*__mtx);
+intmtx_lock(mtx_t *__mtx)
+__locks_exclusive(*__mtx);
+intmtx_timedlock(mtx_t *__restrict __mtx,
+const struct timespec *__restrict)
+__trylocks_exclusive(thrd_success, *__mtx);
+intmtx_trylock(mtx_t *__mtx)
+__trylocks_exclusive(thrd_success, *__mtx);
+intmtx_unlock(mtx_t *__mtx)
+__unlocks(*__mtx);
+intthrd_create(thrd_t *, thrd_start_t, void *);
+thrd_t thrd_current(void);
+intthrd_detach(thrd_t);
+intthrd_equal(thrd_t, thrd_t);
+_Noreturn void
+   thrd_exit(int);
+intthrd_join(thrd_t, int *);
+intthrd_sleep(const struct timespec *, struct timespec *);
+void   thrd_yield(void);
+inttss_create(tss_t *, tss_dtor_t);
+void   tss_delete(tss_t);
+void * tss_get(tss_t);
+inttss_set(tss_t, void *);
+__END_DECLS
+
+#endif /* !_THREADS_H_ */
diff --git a/newlib/libc/sys/rtems/include/machine/_threads.h
b/newlib/libc/sys/rtems/include/machine/_threads.h
new file mode 100644
index 000..24db21c
--- /dev/null
+++ b/newlib/libc/sys/rtems/include/machine/_threads.h
@@ -0,0 +1,54 @

Re: [PATCH] Fix exception handler for supporting FPU

2015-10-07 Thread Chris Johns
On 7/10/2015 11:00 pm, Daniel Gutson wrote:
> 
> FWIW no need from feedback from us.
> 

Can we assume this is an ok from you?

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


Re: [PATCH 3/3] C11 threads support

2015-10-07 Thread Sebastian Huber

Hello Jeff,

I sent the RTEMS implementation of this API to the RTEMS list only:

https://lists.rtems.org/pipermail/devel/2015-September/012597.html
https://lists.rtems.org/pipermail/devel/2015-September/012598.html

It is a slight modification of the FreeBSD libstdthreads. The original 
FreeBSD implementation uses , so it would be possible to add 
this as a default implementation for Newlib. I am not sure how to 
integrate this in the build system. If desired, this could be done in a 
second step.


On 08/10/15 00:04, Jeff Johnston wrote:

I am ok with this although I would like to hear that at least RTEMS or another 
configuration
supports or plans to support threads.h and functions.  C11 says that the flag 
__STDC_NO_THREADS__
can be used to indicate that threads.h and the functions are missing.


--
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