/[pcre]/code/trunk/sljit/sljitUtils.c
ViewVC logotype

Diff of /code/trunk/sljit/sljitUtils.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1194 by zherczeg, Sun Oct 28 05:50:36 2012 UTC revision 1195 by zherczeg, Thu Nov 1 15:21:27 2012 UTC
# Line 163  SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL Line 163  SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL
163  #include <fcntl.h>  #include <fcntl.h>
164    
165  /* Some old systems does not have MAP_ANON. */  /* Some old systems does not have MAP_ANON. */
166  static int dev_zero = -1;  static sljit_si dev_zero = -1;
167    
168  #if (defined SLJIT_SINGLE_THREADED && SLJIT_SINGLE_THREADED)  #if (defined SLJIT_SINGLE_THREADED && SLJIT_SINGLE_THREADED)
169    
170  static SLJIT_INLINE int open_dev_zero(void)  static SLJIT_INLINE sljit_si open_dev_zero(void)
171  {  {
172          dev_zero = open("/dev/zero", O_RDWR);          dev_zero = open("/dev/zero", O_RDWR);
173          return dev_zero < 0;          return dev_zero < 0;
# Line 179  static SLJIT_INLINE int open_dev_zero(vo Line 179  static SLJIT_INLINE int open_dev_zero(vo
179    
180  static pthread_mutex_t dev_zero_mutex = PTHREAD_MUTEX_INITIALIZER;  static pthread_mutex_t dev_zero_mutex = PTHREAD_MUTEX_INITIALIZER;
181    
182  static SLJIT_INLINE int open_dev_zero(void)  static SLJIT_INLINE sljit_si open_dev_zero(void)
183  {  {
184          pthread_mutex_lock(&dev_zero_mutex);          pthread_mutex_lock(&dev_zero_mutex);
185          dev_zero = open("/dev/zero", O_RDWR);          dev_zero = open("/dev/zero", O_RDWR);
# Line 198  static SLJIT_INLINE int open_dev_zero(vo Line 198  static SLJIT_INLINE int open_dev_zero(vo
198  #if (defined SLJIT_UTIL_STACK && SLJIT_UTIL_STACK)  #if (defined SLJIT_UTIL_STACK && SLJIT_UTIL_STACK)
199    
200  /* Planning to make it even more clever in the future. */  /* Planning to make it even more clever in the future. */
201  static sljit_w sljit_page_align = 0;  static sljit_sw sljit_page_align = 0;
202    
203  SLJIT_API_FUNC_ATTRIBUTE struct sljit_stack* SLJIT_CALL sljit_allocate_stack(sljit_uw limit, sljit_uw max_limit)  SLJIT_API_FUNC_ATTRIBUTE struct sljit_stack* SLJIT_CALL sljit_allocate_stack(sljit_uw limit, sljit_uw max_limit)
204  {  {
# Line 285  SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL Line 285  SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL
285          SLJIT_FREE(stack);          SLJIT_FREE(stack);
286  }  }
287    
288  SLJIT_API_FUNC_ATTRIBUTE sljit_w SLJIT_CALL sljit_stack_resize(struct sljit_stack* stack, sljit_uw new_limit)  SLJIT_API_FUNC_ATTRIBUTE sljit_sw SLJIT_CALL sljit_stack_resize(struct sljit_stack* stack, sljit_uw new_limit)
289  {  {
290          sljit_uw aligned_old_limit;          sljit_uw aligned_old_limit;
291          sljit_uw aligned_new_limit;          sljit_uw aligned_new_limit;

Legend:
Removed from v.1194  
changed lines
  Added in v.1195

  ViewVC Help
Powered by ViewVC 1.1.5