marco 1.29.1
Window manager
Loading...
Searching...
No Matches
testasyncgetprop.c File Reference
View source
#include "async-getprop.h"
#include <time.h>
#include <sys/time.h>
#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <signal.h>
#include <assert.h>
#include <glib.h>
Include dependency graph for testasyncgetprop.c:

Macros

#define TRUE   1
 
#define FALSE   0
 
#define NULL   ((void*) 0)
 
#define ELAPSED(start_time, current_time)
 

Functions

static void print_backtrace (void)
 
static int x_error_handler (Display *xdisplay, XErrorEvent *error)
 
static void error_trap_push (Display *xdisplay)
 
static void error_trap_pop (Display *xdisplay)
 
static char * my_strdup (const char *str)
 
static char * atom_name (Display *display, Atom atom)
 
static Bool try_get_reply (Display *xdisplay, AgGetPropertyTask *task)
 
static void run_speed_comparison (Display *xdisplay, Window window)
 
int main (int argc, char **argv)
 

Variables

static int error_trap_depth = 0
 
static struct timeval program_start_time
 

Macro Definition Documentation

◆ ELAPSED

#define ELAPSED (   start_time,
  current_time 
)
Value:
(((((double)current_time.tv_sec - start_time.tv_sec) * 1000000 + \
(current_time.tv_usec - start_time.tv_usec))) / 1000.0)

◆ FALSE

#define FALSE   0

◆ NULL

#define NULL   ((void*) 0)

◆ TRUE

#define TRUE   1

Function Documentation

◆ atom_name()

static char * atom_name ( Display *  display,
Atom  atom 
)
static

References error_trap_pop(), error_trap_push(), my_strdup(), and NULL.

Referenced by try_get_reply().

Here is the call graph for this function:

◆ error_trap_pop()

static void error_trap_pop ( Display *  xdisplay)
static

References error_trap_depth.

Referenced by atom_name(), and run_speed_comparison().

◆ error_trap_push()

static void error_trap_push ( Display *  xdisplay)
static

References error_trap_depth.

Referenced by atom_name(), and run_speed_comparison().

◆ main()

int main ( int  argc,
char **  argv 
)

References ag_get_next_completed_task(), ag_task_create(), ELAPSED, NULL, program_start_time, run_speed_comparison(), TRUE, try_get_reply(), and x_error_handler().

Here is the call graph for this function:

◆ my_strdup()

static char * my_strdup ( const char *  str)
static

References NULL.

Referenced by atom_name().

◆ print_backtrace()

static void print_backtrace ( void  )
static

Referenced by x_error_handler().

◆ run_speed_comparison()

static void run_speed_comparison ( Display *  xdisplay,
Window  window 
)
static

References ag_get_next_completed_task(), ag_task_create(), ag_task_get_reply_and_free(), ag_task_have_reply(), ELAPSED, error_trap_pop(), error_trap_push(), NULL, and TRUE.

Referenced by main().

Here is the call graph for this function:

◆ try_get_reply()

static Bool try_get_reply ( Display *  xdisplay,
AgGetPropertyTask *  task 
)
static

References ag_task_get_property(), ag_task_get_reply_and_free(), ag_task_get_window(), ag_task_have_reply(), atom_name(), ELAPSED, NULL, and program_start_time.

Referenced by main().

Here is the call graph for this function:

◆ x_error_handler()

static int x_error_handler ( Display *  xdisplay,
XErrorEvent *  error 
)
static

References error_trap_depth, and print_backtrace().

Referenced by main().

Here is the call graph for this function:

Variable Documentation

◆ error_trap_depth

int error_trap_depth = 0
static

◆ program_start_time

struct timeval program_start_time
static

Referenced by main(), and try_get_reply().