lock.c 533 B

123456789101112131415161718192021222324252627282930
  1. /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
  2. * Use of this source code is governed by a BSD-style license that can be
  3. * found in the LICENSE file.
  4. */
  5. /* Test of locking, to see if locks count as writes. (They should.)
  6. */
  7. #include <stdio.h>
  8. #include <stdlib.h>
  9. #include "tlcl.h"
  10. #define INDEX0 0xda70
  11. int main(int argc, char** argv) {
  12. TlclLibInit();
  13. TlclStartup();
  14. TlclSelfTestFull();
  15. TlclAssertPhysicalPresence();
  16. TlclWriteLock(INDEX0);
  17. printf("Locked 0x%x\n", INDEX0);
  18. exit(0);
  19. }