3 This software is a copyrighted work licensed under the terms of the
4 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
14 tmp_pathbuf () __attribute__ ((always_inline
))
15 : c_buf_old (_my_tls
.locals
.pathbufs
.c_cnt
),
16 w_buf_old (_my_tls
.locals
.pathbufs
.w_cnt
)
18 ~tmp_pathbuf () __attribute__ ((always_inline
))
20 _my_tls
.locals
.pathbufs
.c_cnt
= c_buf_old
;
21 _my_tls
.locals
.pathbufs
.w_cnt
= w_buf_old
;
24 inline bool check_usage (uint32_t c_need
, uint32_t w_need
)
26 return c_need
+ c_buf_old
< TP_NUM_C_BUFS
27 && w_need
+ w_buf_old
< TP_NUM_W_BUFS
;
29 char *c_get (); /* Create temporary TLS path buf of size NT_MAX_PATH. */
30 PWCHAR
w_get (); /* Create temporary TLS path buf of size 2 * NT_MAX_PATH. */
31 inline char *t_get () { return (char *) w_get (); }
32 inline PUNICODE_STRING
u_get (PUNICODE_STRING up
)
35 up
->MaximumLength
= (NT_MAX_PATH
- 1) * sizeof (WCHAR
);
36 up
->Buffer
= w_get ();