All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] pthreads?
@ 2003-09-11 15:54 Geert Uytterhoeven
  2003-09-11 17:55 ` Jeff Dike
  2003-09-12  8:52 ` [uml-devel] pthreads? Gerd Knorr
  0 siblings, 2 replies; 33+ messages in thread
From: Geert Uytterhoeven @ 2003-09-11 15:54 UTC (permalink / raw)
  To: User-mode Linux Kernel Development; +Cc: Geert Uytterhoeven

	Hi,

I'm working on a virtual frame buffer device for UML that displays in a GDK/GTK
window. The GDK/GTK frame buffer device works fine as a standalone application,
but when compiled into the kernel things get more challenging.

GTK needs GDK, X11, ..., and finally I need libpthread.

As soon as I link the final image with -lpthread (even if it's not
used/referenced anywhere else), the resulting image no longer boots, but hangs
very soon. This is easily reproducible by doing:

| tux$ gcc -Wl,-T,arch/um/uml.lds.s -static -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc -o linux arch/um/main.o vmlinux -L/usr/lib -lutil -lpthread
| tux$ ./linux
| Checking for the skas3 patch in the host...not found
| Checking for /proc/mm...not found
| capture_stack : Expected SIGSTOP, got status = 0xb7f
| tux$ ./linux debug
| Checking for the skas3 patch in the host...not found
| Checking for /proc/mm...not found
| capture_stack : Expected SIGSTOP, got status = 0xb7f
| tux$ 

Does anyone have a solution for this?

Perhaps I have to `wrap' some symbols from libpthread?
I noticed libpthread implements e.g. longjmp(), sigaction(), sigwait(), ...

Or don't link with libpthread and implement the required pthread functionality
myself in term of kernel threads and synchronization primitives? I seem to need
at least these:

    pthread_cond_init
    pthread_cond_destroy
    pthread_cond_broadcast
    pthread_cond_signal
    pthread_cond_timedwait
    pthread_cond_wait
    pthread_setspecific
    pthread_getspecific
    pthread_key_create
    pthread_mutex_init
    pthread_mutex_destroy
    pthread_mutex_lock
    pthread_mutex_trylock
    pthread_mutex_unlock
    pthread_equal

Thanks for your suggestions!

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 33+ messages in thread
* Re: [uml-devel] Re: pthreads?
@ 2003-09-12 12:30 stian
  0 siblings, 0 replies; 33+ messages in thread
From: stian @ 2003-09-12 12:30 UTC (permalink / raw)
  To: user-mode-linux-devel

> fre 2003-09-12 klockan 11.07 skrev Geert Uytterhoeven:
>
>> GdkRgb is nice for displaying pictures, without having to care about X
server
>> visuals, etc. I.e. I need to write less code.  And I want a few buttons to
>> control the fbdev behavior.
>>
>> BTW, it's libX11 that needs libpthread...
>
> What about running the X11 stuff in a helper and using mmap to map the
framebuffer data in both the UML and the helper process?

I think this might be the way to go, and some socket or pipe for doing
change-mode stuff


Stian




This mail has been scanned for known viruses on an open, Linux-based mailsystem
developed by http://Knowledge-Network.no and http://Nixia.no.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2003-10-12  9:53 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-11 15:54 [uml-devel] pthreads? Geert Uytterhoeven
2003-09-11 17:55 ` Jeff Dike
2003-09-12  8:52 ` [uml-devel] pthreads? Gerd Knorr
2003-09-12  9:07   ` Geert Uytterhoeven
2003-09-12 11:08     ` Gerd Knorr
2003-09-12 11:18       ` Geert Uytterhoeven
2003-09-12 12:15         ` Gerd Knorr
2003-09-12 12:17           ` Geert Uytterhoeven
2003-09-12 11:18     ` Henrik Nordstrom
2003-09-12 16:28       ` Jeff Dike
2003-09-12 22:25         ` Henrik Nordstrom
2003-09-13 18:53           ` Jeff Dike
2003-09-13 21:01             ` Henrik Nordstrom
2003-09-13 15:24         ` Geert Uytterhoeven
2003-09-13 18:54           ` Jeff Dike
2003-09-15  6:57             ` Geert Uytterhoeven
2003-09-15  9:19               ` Henrik Nordstrom
2003-09-15  9:28                 ` Geert Uytterhoeven
2003-09-15 10:51                   ` Henrik Nordstrom
2003-09-16 18:44                     ` BlaisorBlade
2003-10-02  9:20                 ` Jan Hudec
2003-10-02  9:08     ` Jan Hudec
2003-10-02  9:24       ` Geert Uytterhoeven
2003-10-02  9:31         ` Jan Hudec
     [not found]           ` <Pine.GSO.4.21.0310021146500.8567-100000@vervain.sonytel.be>
2003-10-02 13:52             ` Jan Hudec
2003-10-02 14:28               ` Geert Uytterhoeven
2003-10-02 14:42                 ` Jan Hudec
2003-10-07 15:51                   ` The Story Continues (was: Re: [uml-devel] Re: pthreads?) Geert Uytterhoeven
2003-10-11  1:48                     ` Jeff Dike
2003-10-11  8:39                       ` Geert Uytterhoeven
2003-10-12  9:53                     ` Geert Uytterhoeven
2003-10-06 13:29       ` [uml-devel] Re: pthreads? BlaisorBlade
  -- strict thread matches above, loose matches on Subject: below --
2003-09-12 12:30 stian

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.