Using SDL threads and openMP, is it safe?

Mainly, my question is in the title of the email ^^. But let me tell me
motivation:
I’m doing something that really needs a powerful processing in order to
perform a critical time system. So, threads are really needed. I have to be
honest: I’m now on treading, but I have the theoretical knowledge ^^".
To achieve that, I need to do some synchronization between threads
(like barrier, that I do not now how to implement only with SDL threads).
Pthread is not a good choice, once I need it to be as portable as possible.
So, openmp was in my mind, also, it’s easier to use.
Then the question is: is there any problem if I mix both threads, SDL
and openMP? And if I use only OpenMP threads,without creating a single
thread by SDL, and use others SDL function (like SDL_RenderPresent), is
there a problem?

PS.: haven’t found that googling–
Atenciosamente, Leonardo Da Vinci

Hi Leonardo.
I continuously use OpenMP in SDL based project. Events and graphics with
SLD 2.0x and threads with OpenMP. Specifically using 99% of OpenMP and very
rarely a call to SDL threads. I do not mix both threads resource.
As additional information, all projects compiled with Intel C and running
under Windows.
Regards.
ArmandoOn Fri, Jun 17, 2016 at 3:20 PM, Leonardo Da Vinci Feliciano Sebasti?o < ldavincif at gmail.com> wrote:

Mainly, my question is in the title of the email ^^. But let me tell

me motivation:
I’m doing something that really needs a powerful processing in order
to perform a critical time system. So, threads are really needed. I have to
be honest: I’m now on treading, but I have the theoretical knowledge ^^".
To achieve that, I need to do some synchronization between threads
(like barrier, that I do not now how to implement only with SDL threads).
Pthread is not a good choice, once I need it to be as portable as possible.
So, openmp was in my mind, also, it’s easier to use.
Then the question is: is there any problem if I mix both threads, SDL
and openMP? And if I use only OpenMP threads,without creating a single
thread by SDL, and use others SDL function (like SDL_RenderPresent), is
there a problem?

PS.: haven’t found that googling


Atenciosamente, Leonardo Da Vinci


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Great, that’s just what a needed.
Thank you very much =)

2016-06-17 15:46 GMT-03:00 Armando Alaminos Bouza :> Hi Leonardo.

I continuously use OpenMP in SDL based project. Events and graphics with
SLD 2.0x and threads with OpenMP. Specifically using 99% of OpenMP and very
rarely a call to SDL threads. I do not mix both threads resource.
As additional information, all projects compiled with Intel C and running
under Windows.
Regards.
Armando

On Fri, Jun 17, 2016 at 3:20 PM, Leonardo Da Vinci Feliciano Sebasti?o < @Leonardo_Da_Vinci_Fe> wrote:

Mainly, my question is in the title of the email ^^. But let me tell

me motivation:
I’m doing something that really needs a powerful processing in order
to perform a critical time system. So, threads are really needed. I have to
be honest: I’m now on treading, but I have the theoretical knowledge ^^".
To achieve that, I need to do some synchronization between threads
(like barrier, that I do not now how to implement only with SDL threads).
Pthread is not a good choice, once I need it to be as portable as possible.
So, openmp was in my mind, also, it’s easier to use.
Then the question is: is there any problem if I mix both threads, SDL
and openMP? And if I use only OpenMP threads,without creating a single
thread by SDL, and use others SDL function (like SDL_RenderPresent), is
there a problem?

PS.: haven’t found that googling


Atenciosamente, Leonardo Da Vinci


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Atenciosamente, Leonardo Da Vinci