Mail Archives: cygwin/2001/03/19/02:45:12
Norma, what that call does is set the behaviour on exit of the newly
created thread. I can (and will) whip up an implementation of this in
cygwin1.dll for the future.
For now I suggest you use
int
gp_create_thread(gp_thread_creation_callback_t proc, void *proc_data)
{
gp_thread_creation_closure_t *closure =
(gp_thread_creation_closure_t *)malloc(sizeof(*closure));
pthread_t ignore_thread;
pthread_attr_t attr;
int code;
if (!closure)
return_error(gs_error_VMerror);
closure->proc = proc;
closure->proc_data = proc_data;
pthread_attr_init(&attr);
/* this should be a feature test, not a platform test - do you have
autoconf ? */
#ifndef __CYGWIN__
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
#endif
code = pthread_create(&ignore_thread, &attr,
gp_thread_begin_wrapper,
closure);
if (code) {
free(closure);
return_error(gs_error_ioerror);
}
/* reverse of previous test */
#ifdef __CYGWIN__
pthread_detach(ignore_thread);
#endif
return 0;
}
which will have the same behaviour.
Rob
----- Original Message -----
From: "Norman Vine" <nhv AT cape DOT com>
To: "'Cygwin-Mailing-List'" <cygwin AT cygwin DOT com>
Sent: Monday, March 19, 2001 5:40 PM
Subject: RE: How to make Ghostscript 5.50 using native windows GUI
> Norman Vine wrote:
> >
> >Kevin Wright wrote:
> >>
> >>I've tried with no luck to build a version of Ghostscript
> >>under cygwin that uses the native windows GUI.
> >
> >I wonder if the mini-xlib built on top of Win32 code
> >that rxvt uses would suffice for ghostscript too ?
> >
> >code at http://www.io.com/~bub/rxvt.html
>
> Update:
> I have managed to get a console only debug version of ghostscript
> compiled with the 200103016 DLL :-))
>
> AFPL Ghostscript 6.50 (2000-12-02)
>
> Input formats: PostScript PostScriptLevel1 PostScriptLevel2 PDF
> Available devices:
> deskjet djet500 laserjet ljetplus ljet2p ljet3 ljet3d ljet4 ljet4d
> lj5mono lj5gray cdeskjet cdjcolor cdjmono cdj550 pj pjxl pjxl300
uniprint
> bj10e bj200 bjc600 bjc800 faxg3 faxg32d faxg4 pcxmono pcxgray pcx16
> pcx256 pcx24b pcxcmyk pbm pbmraw pgm pgmraw pgnm pgnmraw pnm pnmraw
ppm
> ppmraw pkm pkmraw pksm pksmraw tiffcrle tiffg3 tiffg32d tiffg4
tifflzw
> tiffpack tiff12nc tiff24nc psmono psgray psrgb bit bitrgb bitcmyk
jpeg
> jpeggray pdfwrite bbox pswrite epswrite pxlmono pxlcolor cljet5
cljet5c
> nullpage
>
>
> I have only gotten this to work with the non-threaded drivers
> Can anyone help me with the function marked with
> !!!!!!!! below
>
> I will write up a howto within a few days
>
> Cheers
>
> Norman Vine
>
>
> int
> gp_create_thread(gp_thread_creation_callback_t proc, void *proc_data)
> {
> gp_thread_creation_closure_t *closure =
> (gp_thread_creation_closure_t *)malloc(sizeof(*closure));
> pthread_t ignore_thread;
> pthread_attr_t attr;
> int code;
>
> if (!closure)
> return_error(gs_error_VMerror);
> closure->proc = proc;
> closure->proc_data = proc_data;
> pthread_attr_init(&attr);
>
> !!!!!!!!!
> pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
> !!!!!!!!!
> code = pthread_create(&ignore_thread, &attr,
gp_thread_begin_wrapper,
> closure);
> if (code) {
> free(closure);
> return_error(gs_error_ioerror);
> }
> return 0;
> }
>
>
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple
>
>
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -