Skip to content

Commit

Permalink
spinlock: Consolidate into a single implementation
Browse files Browse the repository at this point in the history
Using GLib's atomic primitives.
  • Loading branch information
oleavr committed Jul 18, 2024
1 parent 04bc42f commit 3d0d281
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 296 deletions.
62 changes: 0 additions & 62 deletions gum/backend-arm/gumspinlock-arm.c

This file was deleted.

53 changes: 0 additions & 53 deletions gum/backend-arm64/gumspinlock-arm64.c

This file was deleted.

53 changes: 0 additions & 53 deletions gum/backend-mips/gumspinlock-mips.c

This file was deleted.

61 changes: 0 additions & 61 deletions gum/backend-x86/gumspinlock-ia32-msc.c

This file was deleted.

53 changes: 0 additions & 53 deletions gum/backend-x86/gumspinlock-x86.c

This file was deleted.

File renamed without changes.
17 changes: 3 additions & 14 deletions gum/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ gum_sources = [
'gumprintf.c',
'gumprocess.c',
'gumreturnaddress.c',
'gumspinlock.c',
'gumstalker.c',
'gumswiftapiresolver.c',
'arch-x86' / 'gumx86writer.c',
Expand Down Expand Up @@ -212,17 +213,8 @@ if host_arch in ['x86', 'x86_64']
'backend-x86' / 'guminterceptor-x86.c',
'backend-x86' / 'gumstalker-x86.c',
]
if cc.get_argument_syntax() == 'msvc'
if host_arch == 'x86'
gum_sources += 'backend-x86' / 'gumspinlock-ia32-msc.c'
elif host_arch == 'x86_64'
gum_sources += 'backend-x86' / 'gumspinlock-amd64-msc.c'
endif
else
gum_sources += [
'backend-x86' / 'gumspinlock-x86.c',
'backend-x86' / 'gumstalker-x86-glue.S',
]
if cc.get_argument_syntax() != 'msvc'
gum_sources += 'backend-x86' / 'gumstalker-x86-glue.S'
endif
endif

Expand All @@ -245,7 +237,6 @@ if host_arch == 'arm'
'arch-arm' / 'gumthumbreader.c',
'backend-arm' / 'gumcpucontext-arm.c',
'backend-arm' / 'guminterceptor-arm.c',
'backend-arm' / 'gumspinlock-arm.c',
'backend-arm' / 'gumstalker-arm.c',
'backend-arm' / 'gumstalker-arm-glue.S',
]
Expand All @@ -266,7 +257,6 @@ if host_arch == 'arm64'
'backend-arm64' / 'gumcpucontext-arm64.c',
'backend-arm64' / 'guminterceptor-arm64.c',
'backend-arm64' / 'guminterceptor-arm64-glue.S',
'backend-arm64' / 'gumspinlock-arm64.c',
'backend-arm64' / 'gumstalker-arm64.c',
'backend-arm64' / 'gumstalker-arm64-glue.S',
'backend-arm64' / 'memcpy-advsimd.S',
Expand All @@ -287,7 +277,6 @@ if host_arch in ['mips', 'mips64']
'arch-mips' / 'gummipsreader.c',
'backend-mips' / 'gumcpucontext-mips.c',
'backend-mips' / 'guminterceptor-mips.c',
'backend-mips' / 'gumspinlock-mips.c',
'backend-mips' / 'gumstalker-mips.c',
]
endif
Expand Down

0 comments on commit 3d0d281

Please sign in to comment.