Commit 51885749 authored by Alexandre Julliard's avatar Alexandre Julliard

Renamed handle_t to obj_handle_t to avoid conflict with rpcdce.h.

parent 0427479a
......@@ -51,7 +51,7 @@ struct __server_request_info
extern unsigned int wine_server_call( void *req_ptr );
extern void wine_server_send_fd( int fd );
extern int wine_server_handle_to_fd( handle_t handle, unsigned int access, int *unix_fd,
extern int wine_server_handle_to_fd( obj_handle_t handle, unsigned int access, int *unix_fd,
enum fd_type *type, int *flags );
/* do a server call and set the last error code */
......
......@@ -39,7 +39,7 @@ void WINECON_FetchCells(struct inner_data* data, int upd_tp, int upd_bm)
{
SERVER_START_REQ( read_console_output )
{
req->handle = (handle_t)data->hConOut;
req->handle = (obj_handle_t)data->hConOut;
req->x = 0;
req->y = upd_tp;
req->mode = CHAR_INFO_MODE_TEXTATTR;
......@@ -61,7 +61,7 @@ void WINECON_NotifyWindowChange(struct inner_data* data)
{
SERVER_START_REQ( set_console_output_info )
{
req->handle = (handle_t)data->hConOut;
req->handle = (obj_handle_t)data->hConOut;
req->win_left = data->curcfg.win_pos.X;
req->win_top = data->curcfg.win_pos.Y;
req->win_right = data->curcfg.win_pos.X + data->curcfg.win_width - 1;
......@@ -83,7 +83,7 @@ int WINECON_GetHistorySize(HANDLE hConIn)
SERVER_START_REQ(get_console_input_info)
{
req->handle = (handle_t)hConIn;
req->handle = (obj_handle_t)hConIn;
if (!wine_server_call_err( req )) ret = reply->history_size;
}
SERVER_END_REQ;
......@@ -101,7 +101,7 @@ BOOL WINECON_SetHistorySize(HANDLE hConIn, int size)
SERVER_START_REQ(set_console_input_info)
{
req->handle = (handle_t)hConIn;
req->handle = (obj_handle_t)hConIn;
req->mask = SET_CONSOLE_INPUT_INFO_HISTORY_SIZE;
req->history_size = size;
ret = !wine_server_call_err( req );
......@@ -122,7 +122,7 @@ int WINECON_GetHistoryMode(HANDLE hConIn)
SERVER_START_REQ(get_console_input_info)
{
req->handle = (handle_t)hConIn;
req->handle = (obj_handle_t)hConIn;
if (!wine_server_call_err( req )) ret = reply->history_mode;
}
SERVER_END_REQ;
......@@ -140,7 +140,7 @@ BOOL WINECON_SetHistoryMode(HANDLE hConIn, int mode)
SERVER_START_REQ(set_console_input_info)
{
req->handle = (handle_t)hConIn;
req->handle = (obj_handle_t)hConIn;
req->mask = SET_CONSOLE_INPUT_INFO_HISTORY_MODE;
req->history_mode = mode;
ret = !wine_server_call_err( req );
......@@ -162,7 +162,7 @@ BOOL WINECON_GetConsoleTitle(HANDLE hConIn, WCHAR* buffer, size_t len)
SERVER_START_REQ( get_console_input_info )
{
req->handle = (handle_t)hConIn;
req->handle = (obj_handle_t)hConIn;
wine_server_set_reply( req, buffer, len - sizeof(WCHAR) );
if ((ret = !wine_server_call_err( req )))
{
......@@ -188,7 +188,7 @@ int WINECON_GrabChanges(struct inner_data* data)
SERVER_START_REQ( get_console_renderer_events )
{
wine_server_set_reply( req, evts, sizeof(evts) );
req->handle = (handle_t)data->hSynchro;
req->handle = (obj_handle_t)data->hSynchro;
if (!wine_server_call_err( req )) num = wine_server_reply_size(reply) / sizeof(evts[0]);
else num = 0;
}
......@@ -393,7 +393,7 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, void* pid)
SERVER_START_REQ( set_console_input_info )
{
req->handle = (handle_t)data->hConIn;
req->handle = (obj_handle_t)data->hConIn;
req->mask = SET_CONSOLE_INPUT_INFO_TITLE;
wine_server_add_data( req, szTitle, strlenW(szTitle) * sizeof(WCHAR) );
ret = !wine_server_call_err( req );
......@@ -403,7 +403,7 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, void* pid)
SERVER_START_REQ(create_console_output)
{
req->handle_in = (handle_t)data->hConIn;
req->handle_in = (obj_handle_t)data->hConIn;
req->access = GENERIC_WRITE|GENERIC_READ;
req->share = FILE_SHARE_READ|FILE_SHARE_WRITE;
req->inherit = FALSE;
......
......@@ -277,7 +277,7 @@ void wine_server_send_fd( int fd )
*
* Receive a file descriptor passed from the server.
*/
static int receive_fd( handle_t *handle )
static int receive_fd( obj_handle_t *handle )
{
struct iovec vec;
int ret, fd;
......@@ -336,7 +336,7 @@ static int receive_fd( handle_t *handle )
* Returns the new fd, which can be different if there was already an
* fd in the cache for that handle.
*/
inline static int store_cached_fd( int fd, handle_t handle )
inline static int store_cached_fd( int fd, obj_handle_t handle )
{
SERVER_START_REQ( set_handle_info )
{
......@@ -369,10 +369,10 @@ inline static int store_cached_fd( int fd, handle_t handle )
*
* Retrieve the Unix fd corresponding to a file handle.
*/
int wine_server_handle_to_fd( handle_t handle, unsigned int access, int *unix_fd,
int wine_server_handle_to_fd( obj_handle_t handle, unsigned int access, int *unix_fd,
enum fd_type *type, int *flags )
{
handle_t fd_handle;
obj_handle_t fd_handle;
int ret, fd = -1;
*unix_fd = -1;
......@@ -580,7 +580,7 @@ void CLIENT_InitServer(void)
char hostname[64];
char *oldcwd, *serverdir;
const char *configdir;
handle_t dummy_handle;
obj_handle_t dummy_handle;
/* retrieve the current directory */
for (size = 512; ; size *= 2)
......
......@@ -328,7 +328,7 @@ int free_console( struct process *process )
* 2/ parent is a renderer which launches process, and process should attach to the console
* renderered by parent
*/
void inherit_console(struct thread *parent_thread, struct process *process, handle_t hconin)
void inherit_console(struct thread *parent_thread, struct process *process, obj_handle_t hconin)
{
int done = 0;
struct process* parent = parent_thread->process;
......@@ -360,7 +360,7 @@ void inherit_console(struct thread *parent_thread, struct process *process, hand
}
}
static struct console_input* console_input_get( handle_t handle, unsigned access )
static struct console_input* console_input_get( obj_handle_t handle, unsigned access )
{
struct console_input* console = 0;
......@@ -385,7 +385,7 @@ static int console_input_signaled( struct object *obj, struct thread *thread )
return console->recnum ? 1 : 0;
}
static int get_console_mode( handle_t handle )
static int get_console_mode( obj_handle_t handle )
{
struct object *obj;
int ret = 0;
......@@ -404,7 +404,7 @@ static int get_console_mode( handle_t handle )
}
/* changes the mode of either a console input or a screen buffer */
static int set_console_mode( handle_t handle, int mode )
static int set_console_mode( obj_handle_t handle, int mode )
{
struct object *obj;
int ret = 0;
......@@ -451,7 +451,7 @@ static int write_console_input( struct console_input* console, int count,
}
/* retrieve a pointer to the console input records */
static int read_console_input( handle_t handle, int count, int flush )
static int read_console_input( obj_handle_t handle, int count, int flush )
{
struct console_input *console;
......@@ -1038,7 +1038,7 @@ static void read_console_output( struct screen_buffer *screen_buffer, int x, int
}
/* scroll parts of a screen buffer */
static void scroll_console_output( handle_t handle, int xsrc, int ysrc, int xdst, int ydst,
static void scroll_console_output( obj_handle_t handle, int xsrc, int ysrc, int xdst, int ydst,
int w, int h )
{
struct screen_buffer *screen_buffer;
......@@ -1101,8 +1101,8 @@ static void scroll_console_output( handle_t handle, int xsrc, int ysrc, int xdst
/* allocate a console for the renderer */
DECL_HANDLER(alloc_console)
{
handle_t in = 0;
handle_t evt = 0;
obj_handle_t in = 0;
obj_handle_t evt = 0;
struct process *process;
struct process *renderer = current->process;
struct console_input *console;
......@@ -1180,7 +1180,7 @@ DECL_HANDLER(open_console)
obj = grab_object( (struct object*)current->process->console->active );
break;
default:
if ((obj = get_handle_obj( current->process, (handle_t)req->from,
if ((obj = get_handle_obj( current->process, (obj_handle_t)req->from,
GENERIC_READ|GENERIC_WRITE, &console_input_ops )))
{
struct console_input* console = (struct console_input*)obj;
......
......@@ -45,7 +45,7 @@ struct console_input
/* console functions */
extern void inherit_console(struct thread *parent_thread, struct process *process, handle_t hconin);
extern void inherit_console(struct thread *parent_thread, struct process *process, obj_handle_t hconin);
extern int free_console( struct process *process );
#endif /* __WINE_SERVER_CONSOLE_H */
......@@ -115,7 +115,7 @@ static int fill_create_thread_event( struct debug_event *event, void *arg )
{
struct process *debugger = event->debugger->process;
struct thread *thread = event->sender;
handle_t handle;
obj_handle_t handle;
/* documented: THREAD_GET_CONTEXT | THREAD_SET_CONTEXT | THREAD_SUSPEND_RESUME */
if (!(handle = alloc_handle( debugger, thread, THREAD_ALL_ACCESS, FALSE ))) return 0;
......@@ -130,7 +130,7 @@ static int fill_create_process_event( struct debug_event *event, void *arg )
struct process *debugger = event->debugger->process;
struct thread *thread = event->sender;
struct process *process = thread->process;
handle_t handle;
obj_handle_t handle;
/* documented: PROCESS_VM_READ | PROCESS_VM_WRITE */
if (!(handle = alloc_handle( debugger, process, PROCESS_ALL_ACCESS, FALSE ))) return 0;
......@@ -182,7 +182,7 @@ static int fill_load_dll_event( struct debug_event *event, void *arg )
{
struct process *debugger = event->debugger->process;
struct process_dll *dll = arg;
handle_t handle = 0;
obj_handle_t handle = 0;
if (dll->file && !(handle = alloc_handle( debugger, dll->file, GENERIC_READ, FALSE )))
return 0;
......
......@@ -77,7 +77,7 @@ struct event *create_event( const WCHAR *name, size_t len,
return event;
}
struct event *get_event_obj( struct process *process, handle_t handle, unsigned int access )
struct event *get_event_obj( struct process *process, obj_handle_t handle, unsigned int access )
{
return (struct event *)get_handle_obj( process, handle, access, &event_ops );
}
......
......@@ -463,12 +463,12 @@ void file_set_error(void)
}
}
struct file *get_file_obj( struct process *process, handle_t handle, unsigned int access )
struct file *get_file_obj( struct process *process, obj_handle_t handle, unsigned int access )
{
return (struct file *)get_handle_obj( process, handle, access, &file_ops );
}
static int set_file_pointer( handle_t handle, unsigned int *low, int *high, int whence )
static int set_file_pointer( obj_handle_t handle, unsigned int *low, int *high, int whence )
{
struct file *file;
off_t result,xto;
......@@ -548,7 +548,7 @@ int grow_file( struct file *file, int size_high, int size_low )
return ret;
}
static int set_file_time( handle_t handle, time_t access_time, time_t write_time )
static int set_file_time( obj_handle_t handle, time_t access_time, time_t write_time )
{
struct file *file;
struct utimbuf utimbuf;
......
......@@ -65,11 +65,11 @@ static struct handle_table *global_table;
/* handle to table index conversion */
/* handles are a multiple of 4 under NT; handle 0 is not used */
inline static handle_t index_to_handle( int index )
inline static obj_handle_t index_to_handle( int index )
{
return (handle_t)((index + 1) << 2);
return (obj_handle_t)((index + 1) << 2);
}
inline static int handle_to_index( handle_t handle )
inline static int handle_to_index( obj_handle_t handle )
{
return ((unsigned int)handle >> 2) - 1;
}
......@@ -78,18 +78,18 @@ inline static int handle_to_index( handle_t handle )
#define HANDLE_OBFUSCATOR 0x544a4def
inline static int handle_is_global( handle_t handle)
inline static int handle_is_global( obj_handle_t handle)
{
return ((unsigned long)handle ^ HANDLE_OBFUSCATOR) < 0x10000;
}
inline static handle_t handle_local_to_global( handle_t handle )
inline static obj_handle_t handle_local_to_global( obj_handle_t handle )
{
if (!handle) return 0;
return (handle_t)((unsigned long)handle ^ HANDLE_OBFUSCATOR);
return (obj_handle_t)((unsigned long)handle ^ HANDLE_OBFUSCATOR);
}
inline static handle_t handle_global_to_local( handle_t handle )
inline static obj_handle_t handle_global_to_local( obj_handle_t handle )
{
return (handle_t)((unsigned long)handle ^ HANDLE_OBFUSCATOR);
return (obj_handle_t)((unsigned long)handle ^ HANDLE_OBFUSCATOR);
}
......@@ -189,7 +189,7 @@ static int grow_handle_table( struct handle_table *table )
}
/* allocate the first free entry in the handle table */
static handle_t alloc_entry( struct handle_table *table, void *obj, unsigned int access )
static obj_handle_t alloc_entry( struct handle_table *table, void *obj, unsigned int access )
{
struct handle_entry *entry = table->entries + table->free;
int i;
......@@ -211,7 +211,7 @@ static handle_t alloc_entry( struct handle_table *table, void *obj, unsigned int
/* allocate a handle for an object, incrementing its refcount */
/* return the handle, or 0 on error */
handle_t alloc_handle( struct process *process, void *obj, unsigned int access, int inherit )
obj_handle_t alloc_handle( struct process *process, void *obj, unsigned int access, int inherit )
{
struct handle_table *table = (struct handle_table *)process->handles;
......@@ -223,7 +223,7 @@ handle_t alloc_handle( struct process *process, void *obj, unsigned int access,
/* allocate a global handle for an object, incrementing its refcount */
/* return the handle, or 0 on error */
static handle_t alloc_global_handle( void *obj, unsigned int access )
static obj_handle_t alloc_global_handle( void *obj, unsigned int access )
{
if (!global_table)
{
......@@ -234,7 +234,7 @@ static handle_t alloc_global_handle( void *obj, unsigned int access )
}
/* return a handle entry, or NULL if the handle is invalid */
static struct handle_entry *get_handle( struct process *process, handle_t handle )
static struct handle_entry *get_handle( struct process *process, obj_handle_t handle )
{
struct handle_table *table = (struct handle_table *)process->handles;
struct handle_entry *entry;
......@@ -312,7 +312,7 @@ struct object *copy_handle_table( struct process *process, struct process *paren
/* close a handle and decrement the refcount of the associated object */
/* return 1 if OK, 0 on error */
int close_handle( struct process *process, handle_t handle, int *fd )
int close_handle( struct process *process, obj_handle_t handle, int *fd )
{
struct handle_table *table;
struct handle_entry *entry;
......@@ -347,7 +347,7 @@ void close_global_handles(void)
}
/* retrieve the object corresponding to one of the magic pseudo-handles */
static inline struct object *get_magic_handle( handle_t handle )
static inline struct object *get_magic_handle( obj_handle_t handle )
{
switch((unsigned long)handle)
{
......@@ -362,7 +362,7 @@ static inline struct object *get_magic_handle( handle_t handle )
}
/* retrieve the object corresponding to a handle, incrementing its refcount */
struct object *get_handle_obj( struct process *process, handle_t handle,
struct object *get_handle_obj( struct process *process, obj_handle_t handle,
unsigned int access, const struct object_ops *ops )
{
struct handle_entry *entry;
......@@ -387,7 +387,7 @@ struct object *get_handle_obj( struct process *process, handle_t handle,
}
/* retrieve the cached fd for a given handle */
int get_handle_fd( struct process *process, handle_t handle, unsigned int access )
int get_handle_fd( struct process *process, obj_handle_t handle, unsigned int access )
{
struct handle_entry *entry;
......@@ -402,7 +402,7 @@ int get_handle_fd( struct process *process, handle_t handle, unsigned int access
/* get/set the handle reserved flags */
/* return the old flags (or -1 on error) */
static int set_handle_info( struct process *process, handle_t handle,
static int set_handle_info( struct process *process, obj_handle_t handle,
int mask, int flags, int *fd )
{
struct handle_entry *entry;
......@@ -426,10 +426,10 @@ static int set_handle_info( struct process *process, handle_t handle,
}
/* duplicate a handle */
handle_t duplicate_handle( struct process *src, handle_t src_handle, struct process *dst,
obj_handle_t duplicate_handle( struct process *src, obj_handle_t src_handle, struct process *dst,
unsigned int access, int inherit, int options )
{
handle_t res;
obj_handle_t res;
struct object *obj = get_handle_obj( src, src_handle, 0, NULL );
if (!obj) return 0;
......@@ -454,10 +454,10 @@ handle_t duplicate_handle( struct process *src, handle_t src_handle, struct proc
}
/* open a new handle to an existing object */
handle_t open_object( const WCHAR *name, size_t len, const struct object_ops *ops,
obj_handle_t open_object( const WCHAR *name, size_t len, const struct object_ops *ops,
unsigned int access, int inherit )
{
handle_t handle = 0;
obj_handle_t handle = 0;
struct object *obj = find_object( name, len );
if (obj)
{
......
......@@ -32,15 +32,15 @@ struct object_ops;
/* alloc_handle takes a void *obj for convenience, but you better make sure */
/* that the thing pointed to starts with a struct object... */
extern handle_t alloc_handle( struct process *process, void *obj,
extern obj_handle_t alloc_handle( struct process *process, void *obj,
unsigned int access, int inherit );
extern int close_handle( struct process *process, handle_t handle, int *fd );
extern struct object *get_handle_obj( struct process *process, handle_t handle,
extern int close_handle( struct process *process, obj_handle_t handle, int *fd );
extern struct object *get_handle_obj( struct process *process, obj_handle_t handle,
unsigned int access, const struct object_ops *ops );
extern int get_handle_fd( struct process *process, handle_t handle, unsigned int access );
extern handle_t duplicate_handle( struct process *src, handle_t src_handle, struct process *dst,
extern int get_handle_fd( struct process *process, obj_handle_t handle, unsigned int access );
extern obj_handle_t duplicate_handle( struct process *src, obj_handle_t src_handle, struct process *dst,
unsigned int access, int inherit, int options );
extern handle_t open_object( const WCHAR *name, size_t len, const struct object_ops *ops,
extern obj_handle_t open_object( const WCHAR *name, size_t len, const struct object_ops *ops,
unsigned int access, int inherit );
extern struct object *alloc_handle_table( struct process *process, int count );
extern struct object *copy_handle_table( struct process *process, struct process *parent );
......
......@@ -251,7 +251,7 @@ static int get_image_params( struct mapping *mapping )
static struct object *create_mapping( int size_high, int size_low, int protect,
handle_t handle, const WCHAR *name, size_t len )
obj_handle_t handle, const WCHAR *name, size_t len )
{
struct mapping *mapping;
int access = 0;
......
......@@ -233,7 +233,7 @@ static struct named_pipe *create_named_pipe( const WCHAR *name, size_t len )
return pipe;
}
static struct pipe_user *get_pipe_user_obj( struct process *process, handle_t handle,
static struct pipe_user *get_pipe_user_obj( struct process *process, obj_handle_t handle,
unsigned int access )
{
return (struct pipe_user *)get_handle_obj( process, handle, access, &pipe_user_ops );
......
......@@ -148,7 +148,7 @@ struct event;
extern struct event *create_event( const WCHAR *name, size_t len,
int manual_reset, int initial_state );
extern struct event *get_event_obj( struct process *process, handle_t handle, unsigned int access );
extern struct event *get_event_obj( struct process *process, obj_handle_t handle, unsigned int access );
extern void pulse_event( struct event *event );
extern void set_event( struct event *event );
extern void reset_event( struct event *event );
......@@ -159,7 +159,7 @@ extern void abandon_mutexes( struct thread *thread );
/* file functions */
extern struct file *get_file_obj( struct process *process, handle_t handle,
extern struct file *get_file_obj( struct process *process, obj_handle_t handle,
unsigned int access );
extern int is_same_file( struct file *file1, struct file *file2 );
extern int get_file_drive_type( struct file *file );
......
......@@ -170,7 +170,7 @@ static void pipe_destroy( struct object *obj )
DECL_HANDLER(create_pipe)
{
struct object *obj[2];
handle_t hread = 0, hwrite = 0;
obj_handle_t hread = 0, hwrite = 0;
if (create_pipe( obj ))
{
......
......@@ -80,9 +80,9 @@ struct startup_info
int inherit_all; /* inherit all handles from parent */
int use_handles; /* use stdio handles */
int create_flags; /* creation flags */
handle_t hstdin; /* handle for stdin */
handle_t hstdout; /* handle for stdout */
handle_t hstderr; /* handle for stderr */
obj_handle_t hstdin; /* handle for stdin */
obj_handle_t hstdout; /* handle for stdout */
obj_handle_t hstderr; /* handle for stderr */
struct file *exe_file; /* file handle for main exe */
struct thread *owner; /* owner thread (the one that created the new process) */
struct process *process; /* created process */
......@@ -397,7 +397,7 @@ struct process *get_process_from_id( void *id )
}
/* get a process from a handle (and increment the refcount) */
struct process *get_process_from_handle( handle_t handle, unsigned int access )
struct process *get_process_from_handle( obj_handle_t handle, unsigned int access )
{
return (struct process *)get_handle_obj( current->process, handle,
access, &process_ops );
......
......@@ -94,7 +94,7 @@ struct module_snapshot
extern struct thread *create_process( int fd );
extern struct process *get_process_from_id( void *id );
extern struct process *get_process_from_handle( handle_t handle, unsigned int access );
extern struct process *get_process_from_handle( obj_handle_t handle, unsigned int access );
extern int process_set_debugger( struct process *process, struct thread *thread );
extern int debugger_detach( struct process* process, struct thread* debugger );
......
......@@ -891,7 +891,7 @@ static void delete_value( struct key *key, const WCHAR *name )
}
}
static struct key *create_root_key( handle_t hkey )
static struct key *create_root_key( obj_handle_t hkey )
{
WCHAR keyname[80];
int i, dummy;
......@@ -902,7 +902,7 @@ static struct key *create_root_key( handle_t hkey )
i = 0;
while (*p) keyname[i++] = *p++;
if (hkey == (handle_t)HKEY_CURRENT_USER) /* this one is special */
if (hkey == (obj_handle_t)HKEY_CURRENT_USER) /* this one is special */
{
/* get the current user name */
char buffer[10];
......@@ -927,7 +927,7 @@ static struct key *create_root_key( handle_t hkey )
}
/* get the registry key corresponding to an hkey handle */
static struct key *get_hkey_obj( handle_t hkey, unsigned int access )
static struct key *get_hkey_obj( obj_handle_t hkey, unsigned int access )
{
struct key *key;
......@@ -1330,7 +1330,7 @@ static void load_keys( struct key *key, FILE *f )
}
/* load a part of the registry from a file */
static void load_registry( struct key *key, handle_t handle )
static void load_registry( struct key *key, obj_handle_t handle )
{
struct object *obj;
int fd;
......@@ -1420,7 +1420,7 @@ static void save_all_subkeys( struct key *key, FILE *f )
}
/* save a registry branch to a file handle */
static void save_registry( struct key *key, handle_t handle )
static void save_registry( struct key *key, obj_handle_t handle )
{
struct object *obj;
int fd;
......
......@@ -374,7 +374,7 @@ int receive_fd( struct process *process )
}
/* send an fd to a client */
int send_client_fd( struct process *process, int fd, handle_t handle )
int send_client_fd( struct process *process, int fd, obj_handle_t handle )
{
int ret;
......
......@@ -52,7 +52,7 @@ extern void fatal_perror( const char *err, ... );
extern const char *get_config_dir(void);
extern void *set_reply_data_size( size_t size );
extern int receive_fd( struct process *process );
extern int send_client_fd( struct process *process, int fd, handle_t handle );
extern int send_client_fd( struct process *process, int fd, obj_handle_t handle );
extern void read_request( struct thread *thread );
extern void write_reply( struct thread *thread );
extern unsigned int get_tick_count(void);
......
......@@ -82,7 +82,7 @@ static struct semaphore *create_semaphore( const WCHAR *name, size_t len,
return sem;
}
static unsigned int release_semaphore( handle_t handle, unsigned int count )
static unsigned int release_semaphore( obj_handle_t handle, unsigned int count )
{
struct semaphore *sem;
unsigned int prev = 0;
......
......@@ -174,7 +174,7 @@ static void serial_dump( struct object *obj, int verbose )
fprintf( stderr, "Port fd=%d mask=%x\n", serial->obj.fd, serial->eventmask );
}
struct serial *get_serial_obj( struct process *process, handle_t handle, unsigned int access )
struct serial *get_serial_obj( struct process *process, obj_handle_t handle, unsigned int access )
{
return (struct serial *)get_handle_obj( process, handle, access, &serial_ops );
}
......
......@@ -94,7 +94,7 @@ static void smb_dump( struct object *obj, int verbose )
fprintf( stderr, "smb file with socket fd=%d \n", smb->obj.fd );
}
struct smb *get_smb_obj( struct process *process, handle_t handle, unsigned int access )
struct smb *get_smb_obj( struct process *process, obj_handle_t handle, unsigned int access )
{
return (struct smb *)get_handle_obj( process, handle, access, &smb_ops );
}
......
......@@ -540,7 +540,7 @@ static struct object *create_socket( int family, int type, int protocol, unsigne
}
/* accept a socket (creates a new fd) */
static struct sock *accept_socket( handle_t handle )
static struct sock *accept_socket( obj_handle_t handle )
{
struct sock *acceptsock;
struct sock *sock;
......
......@@ -257,7 +257,7 @@ struct thread *get_thread_from_id( void *id )
}
/* get a thread from a handle (and increment the refcount) */
struct thread *get_thread_from_handle( handle_t handle, unsigned int access )
struct thread *get_thread_from_handle( obj_handle_t handle, unsigned int access )
{
return (struct thread *)get_handle_obj( current->process, handle,
access, &thread_ops );
......@@ -485,7 +485,7 @@ static void thread_timeout( void *ptr )
}
/* select on a list of handles */
static void select_on( int count, void *cookie, const handle_t *handles,
static void select_on( int count, void *cookie, const obj_handle_t *handles,
int flags, int sec, int usec )
{
int ret, i;
......@@ -872,7 +872,7 @@ DECL_HANDLER(open_thread)
DECL_HANDLER(get_thread_info)
{
struct thread *thread;
handle_t handle = req->handle;
obj_handle_t handle = req->handle;
if (!handle) thread = get_thread_from_id( req->tid_in );
else thread = get_thread_from_handle( req->handle, THREAD_QUERY_INFORMATION );
......
......@@ -105,7 +105,7 @@ extern struct thread *current;
extern struct thread *create_thread( int fd, struct process *process );
extern struct thread *get_thread_from_id( void *id );
extern struct thread *get_thread_from_handle( handle_t handle, unsigned int access );
extern struct thread *get_thread_from_handle( obj_handle_t handle, unsigned int access );
extern struct thread *get_thread_from_pid( int pid );
extern int suspend_thread( struct thread *thread, int check_limit );
extern int resume_thread( struct thread *thread );
......
......@@ -117,7 +117,7 @@ static void dump_varargs_ints( size_t size )
static void dump_varargs_handles( size_t size )
{
const handle_t *data = cur_data;
const obj_handle_t *data = cur_data;
size_t len = size / sizeof(*data);
fputc( '{', stderr );
......
......@@ -39,7 +39,7 @@ struct property
{
unsigned short type; /* property type (see below) */
atom_t atom; /* property atom */
handle_t handle; /* property handle (user-defined storage) */
obj_handle_t handle; /* property handle (user-defined storage) */
};
enum property_type
......@@ -138,7 +138,7 @@ static void link_window( struct window *win, struct window *parent, struct windo
}
/* set a window property */
static void set_property( struct window *win, atom_t atom, handle_t handle,
static void set_property( struct window *win, atom_t atom, obj_handle_t handle,
enum property_type type )
{
int i, free = -1;
......@@ -186,7 +186,7 @@ static void set_property( struct window *win, atom_t atom, handle_t handle,
}
/* remove a window property */
static handle_t remove_property( struct window *win, atom_t atom )
static obj_handle_t remove_property( struct window *win, atom_t atom )
{
int i;
......@@ -205,7 +205,7 @@ static handle_t remove_property( struct window *win, atom_t atom )
}
/* find a window property */
static handle_t get_property( struct window *win, atom_t atom )
static obj_handle_t get_property( struct window *win, atom_t atom )
{
int i;
......
......@@ -31,7 +31,7 @@
"void*" => "%p",
"time_t" => "%ld",
"size_t" => "%d",
"handle_t" => "%d",
"obj_handle_t" => "%d",
"atom_t" => "%04x",
"user_handle_t" => "%08x",
"rectangle_t" => "&dump_rectangle",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment