Skip to content

Commit

Permalink
virtiolib: Clean up osdep.h and kdebugprint.h
Browse files Browse the repository at this point in the history
Just removing cruft from the headers.

Signed-off-by: Ladi Prosek <lprosek@redhat.com>
  • Loading branch information
ladipro authored and YanVugenfirer committed Aug 8, 2017
1 parent 71405a2 commit 9b89619
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 38 deletions.
11 changes: 1 addition & 10 deletions VirtIO/kdebugprint.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
#if defined(IGNORE_VIRTIO_OSDEP_H)
// to make simulation environment easy
#include "external_os_dep.h"
#else

#ifndef _K_DEBUG_PRINT_H
#define _K_DEBUG_PRINT_H
#pragma once

extern int virtioDebugLevel;
extern int bDebugPrint;
Expand All @@ -15,6 +9,3 @@ extern tDebugPrintFunc VirtioDebugPrintProc;

#define DEBUG_ENTRY(level) DPrintf(level, ("[%s]=>\n", __FUNCTION__))
#define DEBUG_EXIT_STATUS(level, status) DPrintf((status == NDIS_STATUS_SUCCESS ? level : 0), ("[%s]<=0x%X\n", __FUNCTION__, (status)))

#endif
#endif
29 changes: 1 addition & 28 deletions VirtIO/osdep.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,11 @@
//
//////////////////////////////////////////////////////////////////////////////////////////

#if defined(IGNORE_VIRTIO_OSDEP_H)
// to make simulation environment easy
#include "external_os_dep.h"
#else

#ifndef __OS_DEP_H
#define __OS_DEP_H
#pragma once

#include <ntddk.h>

#define ktime_t ULONGLONG
#define ktime_get() KeQueryPerformanceCounter(NULL).QuadPart

#define likely(x) x
#define unlikely(x) x

#define ENOSPC 1
#define BUG_ON(a) ASSERT(!(a))
#define WARN_ON(a)
#define BUG() ASSERT(0)

#if !defined(__cplusplus) && !defined(bool)
// Important note: in MSFT C++ bool length is 1 bytes
Expand All @@ -43,16 +28,4 @@
#endif

#define inline __forceinline

#ifdef DBG
#define DEBUG
#endif

#define mb() KeMemoryBarrier()
#define rmb() KeMemoryBarrier()
#define wmb() KeMemoryBarrier()

#define SMP_CACHE_BYTES 64

#endif
#endif

0 comments on commit 9b89619

Please sign in to comment.