From c2e9116e69d333b43dd3b80c8e40dd837afed012 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net>
Date: Wed, 14 Apr 1999 14:05:15 -0700
Subject: [PATCH] threaded

Rev: src/modules/_Image_JPEG/image_jpeg.c:1.21
---
 src/modules/_Image_JPEG/image_jpeg.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/modules/_Image_JPEG/image_jpeg.c b/src/modules/_Image_JPEG/image_jpeg.c
index 8d13523090..0617f31fbc 100644
--- a/src/modules/_Image_JPEG/image_jpeg.c
+++ b/src/modules/_Image_JPEG/image_jpeg.c
@@ -1,5 +1,5 @@
 /*
- * $Id: image_jpeg.c,v 1.20 1999/02/10 21:52:14 hubbe Exp $
+ * $Id: image_jpeg.c,v 1.21 1999/04/14 21:05:15 hubbe Exp $
  */
 
 #include "global.h"
@@ -23,7 +23,7 @@
 #ifdef HAVE_STDLIB_H
 #undef HAVE_STDLIB_H
 #endif
-RCSID("$Id: image_jpeg.c,v 1.20 1999/02/10 21:52:14 hubbe Exp $");
+RCSID("$Id: image_jpeg.c,v 1.21 1999/04/14 21:05:15 hubbe Exp $");
 
 #include "pike_macros.h"
 #include "object.h"
@@ -35,6 +35,7 @@ RCSID("$Id: image_jpeg.c,v 1.20 1999/02/10 21:52:14 hubbe Exp $");
 #include "mapping.h"
 #include "error.h"
 #include "stralloc.h"
+#include "threads.h"
 
 #ifdef HAVE_JPEGLIB_H
 
@@ -372,6 +373,7 @@ static void image_jpeg_encode(INT32 args)
    y=img->ysize;
    s=img->img;
 
+   THREADS_ALLOW();
    while (y)
    {
       int n,i,y2=y;
@@ -393,6 +395,7 @@ static void image_jpeg_encode(INT32 args)
       
       y-=y2;
    }
+   THREADS_DISALLOW();
 
    free(tmp);
 
@@ -541,6 +544,7 @@ static void image_jpeg_decode(INT32 args)
    y=img->ysize;
    d=img->img;
 
+   THREADS_ALLOW();
    while (y)
    {
       int n,m;
@@ -571,6 +575,7 @@ static void image_jpeg_decode(INT32 args)
 	    d->r=d->g=d->b=*(s++),d++;
       y-=n;
    }
+   THREADS_DISALLOW();
 
    free(tmp);
 
-- 
GitLab