Differences From Artifact [bc469c4162]:
- File src/natools-references__intel.adb — part of check-in [ca01910925] at 2014-07-18 17:35:41 on branch trunk — references__intel: new intel-specific task-safe variant of Natools.References (user: nat, size: 5799) [annotate] [blame] [check-ins using]
To Artifact [e77d1335d9]:
- File
src/natools-references__intel.adb
— part of check-in
[610b834d9d]
at
2014-08-24 20:31:35
on branch trunk
— references: add Is_Last primitive
It's almost a break in abstraction, and it's unsafe to use when the reference can be accessed concurrently. However it might have some use in some context, to free the last reference when checked in a protected or thread-local context, to build a crude garbage collection system. (user: nat, size: 5924) [annotate] [blame] [check-ins using]
︙ | |||
111 112 113 114 115 116 117 118 119 120 121 122 123 124 | 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | + + + + + + | function Is_Empty (Ref : Immutable_Reference) return Boolean is begin return Ref.Count = null; end Is_Empty; function Is_Last (Ref : Immutable_Reference) return Boolean is begin return Ref.Count.all = 1; end Is_Last; function "=" (Left, Right : Immutable_Reference) return Boolean is begin return Left.Data = Right.Data; end "="; |
︙ |