bitmap.go 1.5 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2024 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. //go:build !race
  5. package impl
  6. // There is no additional data as we're not running under race detector.
  7. type RaceDetectHookData struct{}
  8. // Empty stubs for when not using the race detector. Calls to these from index.go should be optimized away.
  9. func (presence) raceDetectHookPresent(num uint32) {}
  10. func (presence) raceDetectHookSetPresent(num uint32, size presenceSize) {}
  11. func (presence) raceDetectHookClearPresent(num uint32) {}
  12. func (presence) raceDetectHookAllocAndCopy(src presence) {}
  13. // raceDetectHookPresent is called by the generated file interface
  14. // (*proto.internalFuncs) Present to optionally read an unprotected
  15. // shadow bitmap when race detection is enabled. In regular code it is
  16. // a noop.
  17. func raceDetectHookPresent(field *uint32, num uint32) {}
  18. // raceDetectHookSetPresent is called by the generated file interface
  19. // (*proto.internalFuncs) SetPresent to optionally write an unprotected
  20. // shadow bitmap when race detection is enabled. In regular code it is
  21. // a noop.
  22. func raceDetectHookSetPresent(field *uint32, num uint32, size presenceSize) {}
  23. // raceDetectHookClearPresent is called by the generated file interface
  24. // (*proto.internalFuncs) ClearPresent to optionally write an unprotected
  25. // shadow bitmap when race detection is enabled. In regular code it is
  26. // a noop.
  27. func raceDetectHookClearPresent(field *uint32, num uint32) {}