Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who's Online
20 user(s) are online (17 user(s) are browsing Forum)

Members: 0
Guests: 20

more...

Browsing this Thread:   1 Anonymous Users



(1) 2 3 »


POSIX threads on AROS?

Joined:
2010/1/1 6:14
Group:
Member
Posts: 40
Offline
Hi!
I want to port my virtual machine Nano to AROS.
Nano uses POSIX threads to run program parts parallel.

Programs for the VM can be compiled with the N compiler or
with the assembler. The N compiler has a inline assembler, so
both can be mixed.

Nano also has Flow, a GUI server.
Currently Linux and Windows are supported platforms.

The Linux x86_64 crosscompiler SDK hasn't a pthread.h include.
Is there a way to get a POSIX thread library for the SDK?


Posted on: 2012/12/8 11:20
Transfer the post to other applications Transfer


Re: POSIX threads on AROS?

Joined:
2011/9/25 1:23
From Hungary
Group:
Member
Posts: 1310
Offline
No, but the most commonly used pthread functions can be substituted with thread.library calls. Take a look at this page: http://aros.sourceforge.net/documenta ... opers/autodocs/thread.php

Posted on: 2012/12/8 11:42
_________________
My AROS&MorphOS ports
Arguments that explain everything... explain nothing.
Transfer the post to other applications Transfer


Re: POSIX threads on AROS?

Joined:
2010/1/1 6:14
Group:
Member
Posts: 40
Offline
OK. Now I know where to look at.
Thanks!

Posted on: 2012/12/22 8:58
Transfer the post to other applications Transfer


Re: POSIX threads on AROS?

Joined:
2004/4/7 4:26
Group:
Member
Posts: 3637
Offline
Good luck! It would be great to have nano available for AROS.

Posted on: 2012/12/22 16:46
_________________
p.bes
Icaros Desktop AROS distribution mantainer
Transfer the post to other applications Transfer


Re: POSIX threads on AROS?

Joined:
2006/7/29 4:11
Group:
Member
Posts: 2985
Offline
Yep! Good luck!

Posted on: 2012/12/23 5:43
_________________
http://www.vesalia.de/e_aresone2011.htm
www.aresone.de
www.aros-broadway.de still WIP
www.ares-shop.de the ground for our app-store
Transfer the post to other applications Transfer


Re: POSIX threads on AROS?

Joined:
2010/1/1 6:14
Group:
Member
Posts: 40
Offline
I'm currently making changes to th Nano sources to make a build.

I made a make script:

#!/bin/bash
export CC=x86_64-aros-gcc
export AS=x86_64-aros-as
export LD=x86_64-aros-ld
export AR=x86_64-aros-ar
export RANLIB=x86_64-aros-ranlib
export STRIP=x86_64-aros-strip
./configure CFLAGS="-ffast-math -fomit-frame-pointer -O2 -s -D__AROS__" \
--host=x86_64-pc-linux-gnu \
LDFLAGS="-lthread"
make


GCC can't find the threads library on linking.
There isn't any libthread.a in my lib directory.
Where can I find it?


BTW Here is the project homepage:
http://www.jay-t.de/nano/index.html

Posted on: 2012/12/23 22:18
Transfer the post to other applications Transfer


Re: POSIX threads on AROS?

Joined:
2011/9/25 1:23
From Hungary
Group:
Member
Posts: 1310
Offline
Are you sure about compiling for x86_64? Currently i386 is the only supported architecture for ABIv0, and that's what everyone uses, including the distributions.
Also there's no libthread.a, only thread.library shared library. You have to include , declare struct Library *ThreadBase, and open/close the library with OpenLibrary()/CloseLibrary().

Posted on: 2012/12/24 0:42
_________________
My AROS&MorphOS ports
Arguments that explain everything... explain nothing.
Transfer the post to other applications Transfer


Re: POSIX threads on AROS?

Joined:
2010/1/1 6:14
Group:
Member
Posts: 40
Offline
I'm adding now OpenLibrary () / CloseLibrary.

I have an include/libraries/thread.h
But not an include/proto/thread.h

If I understand it right I have to include a proto/ include
to tell the compiler to use a shared library.

Is that right?


About using x86_64 gcc: I want to check my build on Linux Hosted AROS. And I'm using a 64 bit Linux.

Posted on: 2012/12/24 3:47
Transfer the post to other applications Transfer


Re: POSIX threads on AROS?

Joined:
2011/9/25 1:23
From Hungary
Group:
Member
Posts: 1310
Offline
Yup, you need proto/thread.h, which will include clib/thread_protos.h for you. To me it sounds like you have an incomplete dev environment.

Posted on: 2012/12/24 6:10
_________________
My AROS&MorphOS ports
Arguments that explain everything... explain nothing.
Transfer the post to other applications Transfer


Re: POSIX threads on AROS?

Joined:
2010/1/1 6:14
Group:
Member
Posts: 40
Offline
I copied the includes from the 386 SDK.
Now I'm including this:


#include <proto/exec.h>
#include <exec/libraries.h>
#include <dos/dos.h>
#include <proto/thread.h>


At the CloseLibrary() call, the compiler throws an error:

There are undefined symbols in 'nanoa':
U SysBase /home/stefan/sources/svn/nano-vm-3.0.22-new-aros/nano-vm-code/lib/mem.c:1166
make[2]: *** [nanoa] Error 1


Where is SysBase declared? Is it of struct Library used in CloseLibrary() ?

Posted on: 2012/12/26 5:09
Transfer the post to other applications Transfer



(1) 2 3 »



You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
3637
2 nikolaos
nikolaos
3451
3 phoenixkonsole
phoenixkonsole
2985
4 magorium
magorium
2868
5 deadwood
deadwood
2315
6 mazze
mazze
2058
7 clusteruk
clusteruk
2052
8 ncafferkey
ncafferkey
2048
9 damocles
damocles
1788
10 Kalamatee
Kalamatee
1711
© 2004-2013 AROS Exec