Commit 938db048 authored by Marko Mäkelä's avatar Marko Mäkelä

Cleanup: Remove os0proc.*

parent 48ab5a49
......@@ -28,7 +28,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
#include "write_filt.h"
#include "fil_cur.h"
#include "xtrabackup.h"
#include <os0proc.h>
/************************************************************************
Write-through page write filter. */
......
......@@ -190,7 +190,6 @@ SET(INNOBASE_SOURCES
include/os0event.h
include/os0file.h
include/os0file.ic
include/os0proc.h
include/os0thread.h
include/page0cur.h
include/page0cur.ic
......@@ -296,7 +295,6 @@ SET(INNOBASE_SOURCES
mem/mem0mem.cc
mtr/mtr0mtr.cc
os/os0file.cc
os/os0proc.cc
os/os0event.cc
os/os0thread.cc
page/page0cur.cc
......
......@@ -40,7 +40,6 @@ Created 11/5/1995 Heikki Tuuri
#include "ut0byte.h"
#include "page0types.h"
#include "ut0rbt.h"
#include "os0proc.h"
#include "log0log.h"
#include "srv0srv.h"
#include <ostream>
......
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
*****************************************************************************/
/**************************************************//**
@file include/os0proc.h
The interface to the operating system
process control primitives
Created 9/30/1995 Heikki Tuuri
*******************************************************/
#ifndef os0proc_h
#define os0proc_h
#include "univ.i"
#ifdef UNIV_LINUX
#include <sys/ipc.h>
#include <sys/shm.h>
#endif
typedef void* os_process_t;
typedef unsigned long int os_process_id_t;
/** The total amount of memory currently allocated from the operating
system with allocate_large(). */
extern Atomic_counter<ulint> os_total_large_mem_allocated;
/** Converts the current process id to a number.
@return process id as a number */
ulint
os_proc_get_number(void);
#endif
/*****************************************************************************
Copyright (c) 2014, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 2019, MariaDB Corporation.
Copyright (c) 2017, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -137,7 +137,6 @@ with (), thus:
#include "mysql/psi/psi_memory.h" /* PSI_memory_key, PSI_memory_info */
#include "os0thread.h" /* os_thread_sleep() */
#include "os0proc.h" /* os_total_large_mem_allocated */
#include "ut0ut.h" /* ut_strcmp_functor, ut_basename_noext() */
#define OUT_OF_MEMORY_MSG \
......@@ -145,6 +144,10 @@ with (), thus:
" operating system. Note that on most 32-bit computers the process" \
" memory space is limited to 2 GB or 4 GB."
/** The total amount of memory currently allocated from the operating
system with allocate_large() */
extern Atomic_counter<ulint> os_total_large_mem_allocated;
/** Maximum number of retries to allocate memory. */
extern const size_t alloc_max_retries;
......
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2019, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
*****************************************************************************/
/**************************************************//**
@file os/os0proc.cc
The interface to the operating system
process control primitives
Created 9/30/1995 Heikki Tuuri
*******************************************************/
#include "univ.i"
/** The total amount of memory currently allocated from the operating
system with allocacte_large(). */
Atomic_counter<ulint> os_total_large_mem_allocated;
/** Converts the current process id to a number.
@return process id as a number */
ulint
os_proc_get_number(void)
/*====================*/
{
#ifdef _WIN32
return(static_cast<ulint>(GetCurrentProcessId()));
#else
return(static_cast<ulint>(getpid()));
#endif
}
......@@ -816,7 +816,6 @@ Created 12/14/1997 Heikki Tuuri
#include "pars0grm.h"
#include "pars0sym.h"
#include "mem0mem.h"
#include "os0proc.h"
#define malloc(A) ut_malloc_nokey(A)
#define free(A) ut_free(A)
......
......@@ -58,7 +58,6 @@ Created 12/14/1997 Heikki Tuuri
#include "pars0grm.h"
#include "pars0sym.h"
#include "mem0mem.h"
#include "os0proc.h"
#define malloc(A) ut_malloc_nokey(A)
#define free(A) ut_free(A)
......
......@@ -55,7 +55,6 @@ Created 10/8/1995 Heikki Tuuri
#include "lock0lock.h"
#include "log0recv.h"
#include "mem0mem.h"
#include "os0proc.h"
#include "pars0pars.h"
#include "que0que.h"
#include "row0mysql.h"
......
......@@ -76,7 +76,6 @@ Created 2/16/1996 Heikki Tuuri
#include "btr0defragment.h"
#include "mysql/service_wsrep.h" /* wsrep_recovery */
#include "trx0rseg.h"
#include "os0proc.h"
#include "buf0flu.h"
#include "buf0rea.h"
#include "dict0boot.h"
......@@ -1241,7 +1240,8 @@ dberr_t srv_start(bool create_new_db)
sprintf(srv_monitor_file_name,
"%s/innodb_status." ULINTPF,
fil_path_to_mysql_datadir,
os_proc_get_number());
static_cast<ulint>
(IF_WIN(GetCurrentProcessId(), getpid())));
srv_monitor_file = my_fopen(srv_monitor_file_name,
O_RDWR|O_TRUNC|O_CREAT,
......
......@@ -35,7 +35,6 @@ Created 3/26/1996 Heikki Tuuri
#include "btr0sea.h"
#include "lock0lock.h"
#include "log0log.h"
#include "os0proc.h"
#include "que0que.h"
#include "srv0mon.h"
#include "srv0srv.h"
......
......@@ -26,6 +26,10 @@ Created May 26, 2014 Vasil Dimov
#include "univ.i"
#include <algorithm>
/** The total amount of memory currently allocated from the operating
system with allocate_large(). */
Atomic_counter<ulint> os_total_large_mem_allocated;
/** Maximum number of retries to allocate memory. */
const size_t alloc_max_retries = 60;
......
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