~stewart/haildb/remove-univ-static

« back to all changes in this revision

Viewing changes to srv/srv0srv.c

  • Committer: Stewart Smith
  • Date: 2010-08-05 23:28:45 UTC
  • Revision ID: stewart@flamingspork.com-20100805232845-ihsae6mc5teon6n3
remove UNIV_STATIC. It's no longer in the innodb_plugin, replace just with 'static'

Show diffs side-by-side

added added

removed removed

Lines of Context:
289
289
UNIV_INTERN ulint       srv_max_n_threads       = 0;
290
290
 
291
291
/** This mutex protects srv_conc data structures */
292
 
UNIV_STATIC os_fast_mutex_t     srv_conc_mutex;
 
292
static os_fast_mutex_t  srv_conc_mutex;
293
293
 
294
294
/** Number of OS threads waiting in the FIFO for a permission to enter
295
295
InnoDB */
311
311
};
312
312
 
313
313
/** Queue of threads waiting to get in */
314
 
UNIV_STATIC UT_LIST_BASE_NODE_T(srv_conc_slot_t)        srv_conc_queue;
 
314
static UT_LIST_BASE_NODE_T(srv_conc_slot_t)     srv_conc_queue;
315
315
/** Array of wait slots */
316
 
UNIV_STATIC srv_conc_slot_t* srv_conc_slots;
 
316
static srv_conc_slot_t* srv_conc_slots;
317
317
 
318
318
/*-----------------------*/
319
319
UNIV_INTERN ib_shutdown_t       srv_fast_shutdown       = IB_SHUTDOWN_NORMAL;
348
348
UNIV_INTERN ulint       srv_n_rows_deleted              = 0;
349
349
UNIV_INTERN ulint       srv_n_rows_read                 = 0;
350
350
 
351
 
UNIV_STATIC ulint               srv_n_rows_inserted_old         = 0;
352
 
UNIV_STATIC ulint               srv_n_rows_updated_old          = 0;
353
 
UNIV_STATIC ulint               srv_n_rows_deleted_old          = 0;
354
 
UNIV_STATIC ulint               srv_n_rows_read_old             = 0;
 
351
static ulint            srv_n_rows_inserted_old         = 0;
 
352
static ulint            srv_n_rows_updated_old          = 0;
 
353
static ulint            srv_n_rows_deleted_old          = 0;
 
354
static ulint            srv_n_rows_read_old             = 0;
355
355
 
356
356
UNIV_INTERN ulint       srv_n_lock_wait_count           = 0;
357
357
UNIV_INTERN ulint       srv_n_lock_wait_current_count   = 0;
367
367
UNIV_INTERN ibool       srv_print_innodb_tablespace_monitor = FALSE;
368
368
UNIV_INTERN ibool       srv_print_innodb_table_monitor = FALSE;
369
369
 
370
 
UNIV_STATIC time_t              srv_last_monitor_time;
 
370
static time_t           srv_last_monitor_time;
371
371
 
372
 
UNIV_STATIC     mutex_t         srv_innodb_monitor_mutex;
 
372
static  mutex_t         srv_innodb_monitor_mutex;
373
373
 
374
374
/** Mutex for locking srv_monitor_file */
375
375
UNIV_INTERN mutex_t     srv_monitor_file_mutex;
376
376
 
377
377
#ifdef UNIV_LINUX
378
 
UNIV_STATIC ulint               srv_main_thread_process_no      = 0;
 
378
static ulint            srv_main_thread_process_no      = 0;
379
379
#endif /* UNIV_LINUX */
380
 
UNIV_STATIC ulint               srv_main_thread_id              = 0;
 
380
static ulint            srv_main_thread_id              = 0;
381
381
 
382
382
/* The following count work done by srv_master_thread. */
383
383
 
384
384
/** Iterations by the 'once per second' loop. */
385
 
UNIV_STATIC ulint   srv_main_1_second_loops             = 0;
 
385
static ulint   srv_main_1_second_loops          = 0;
386
386
/** Calls to sleep by the 'once per second' loop. */
387
 
UNIV_STATIC ulint   srv_main_sleeps                     = 0;
 
387
static ulint   srv_main_sleeps                  = 0;
388
388
/** Iterations by the 'once per 10 seconds' loop. */
389
 
UNIV_STATIC ulint   srv_main_10_second_loops            = 0;
 
389
static ulint   srv_main_10_second_loops         = 0;
390
390
/** Iterations of the loop bounded by the 'background_loop' label. */
391
 
UNIV_STATIC ulint   srv_main_background_loops   = 0;
 
391
static ulint   srv_main_background_loops        = 0;
392
392
/** Iterations of the loop bounded by the 'flush_loop' label. */
393
 
UNIV_STATIC ulint   srv_main_flush_loops                = 0;
 
393
static ulint   srv_main_flush_loops             = 0;
394
394
/** Log writes involving flush. */
395
 
UNIV_STATIC ulint   srv_log_writes_and_flush            = 0;
 
395
static ulint   srv_log_writes_and_flush         = 0;
396
396
 
397
397
/** This is only ever touched by the master thread. It records the
398
398
time when the last flush of log file has happened. The master
399
399
thread ensures that we flush the log files at least once per
400
400
second. */
401
 
UNIV_STATIC time_t      srv_last_log_flush_time;
 
401
static time_t   srv_last_log_flush_time;
402
402
 
403
403
/** The master thread performs various tasks based on the current
404
404
state of IO activity and the level of IO utilization is past
602
602
} srv_sys_t;
603
603
 
604
604
/** Table for client threads where they will be suspended to wait for locks */
605
 
UNIV_STATIC srv_slot_t* srv_client_table = NULL;
 
605
static srv_slot_t*      srv_client_table = NULL;
606
606
 
607
607
UNIV_INTERN os_event_t  srv_lock_timeout_thread_event;
608
608
 
609
 
UNIV_STATIC     srv_sys_t*      srv_sys = NULL;
 
609
static  srv_sys_t*      srv_sys = NULL;
610
610
 
611
611
/* padding to prevent other memory update hotspots from residing on
612
612
the same memory cache line */
622
622
are indexed by the type of the thread. */
623
623
 
624
624
UNIV_INTERN ulint       srv_n_threads_active[SRV_MASTER + 1];
625
 
UNIV_STATIC ulint               srv_n_threads[SRV_MASTER + 1];
 
625
static ulint            srv_n_threads[SRV_MASTER + 1];
626
626
 
627
627
/***********************************************************************
628
628
Prints counters for work done by srv_master_thread. */
629
 
UNIV_STATIC
 
629
static
630
630
void
631
631
srv_print_master_thread_info(
632
632
/*=========================*/
779
779
Accessor function to get pointer to n'th slot in the server thread
780
780
table.
781
781
@return pointer to the slot */
782
 
UNIV_STATIC
 
782
static
783
783
srv_slot_t*
784
784
srv_table_get_nth_slot(
785
785
/*===================*/
818
818
thread local storage struct for the current thread. NOTE! The server mutex
819
819
has to be reserved by the caller!
820
820
@return reserved slot index */
821
 
UNIV_STATIC
 
821
static
822
822
ulint
823
823
srv_table_reserve_slot(
824
824
/*===================*/
857
857
Suspends the calling thread to wait for the event in its thread slot.
858
858
NOTE! The server mutex has to be reserved by the caller!
859
859
@return event for the calling thread to wait */
860
 
UNIV_STATIC
 
860
static
861
861
os_event_t
862
862
srv_suspend_thread(void)
863
863
/*====================*/
979
979
 
980
980
/*********************************************************************//**
981
981
Initializes the server. */
982
 
UNIV_STATIC
 
982
static
983
983
void
984
984
srv_init(void)
985
985
/*==========*/
1116
1116
/*********************************************************************//**
1117
1117
Normalizes init parameter values to use units we use inside InnoDB.
1118
1118
@return DB_SUCCESS or error code */
1119
 
UNIV_STATIC
 
1119
static
1120
1120
ulint
1121
1121
srv_normalize_init_values(void)
1122
1122
/*===========================*/
1220
1220
Reserves a slot in the thread table for the current user OS thread.
1221
1221
NOTE! The kernel mutex has to be reserved by the caller!
1222
1222
@return reserved slot */
1223
 
UNIV_STATIC
 
1223
static
1224
1224
srv_slot_t*
1225
1225
srv_table_reserve_slot_for_user_thread(void)
1226
1226
/*========================================*/
1474
1474
 
1475
1475
/******************************************************************//**
1476
1476
Refreshes the values used to calculate per-second averages. */
1477
 
UNIV_STATIC
 
1477
static
1478
1478
void
1479
1479
srv_refresh_innodb_monitor_stats(void)
1480
1480
/*==================================*/
2192
2192
once every second in the background. This is to ensure that not more
2193
2193
than one second of trxs are lost in case of crash when
2194
2194
innodb_flush_logs_at_trx_commit != 1 */
2195
 
UNIV_STATIC
 
2195
static
2196
2196
void
2197
2197
srv_sync_log_buffer_in_background(void)
2198
2198
/*===================================*/