delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/03/19/02:45:12

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <000f01c0b048$0c4164c0$0200a8c0@lifelesswks>
From: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
To: <nhv AT cape DOT com>, "'Cygwin-Mailing-List'" <cygwin AT cygwin DOT com>
References: <000401c0b03f$7ce3b560$a300a8c0 AT nhv>
Subject: Re: How to make Ghostscript 5.50 using native windows GUI
Date: Mon, 19 Mar 2001 18:41:11 +1100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-OriginalArrivalTime: 19 Mar 2001 07:36:05.0170 (UTC) FILETIME=[41561120:01C0B047]

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019