2021/01/09

2021/01/09

1
2
3
4
5
6
7
typedef struct AtomicT <T>{
    union Data* atomicTImpl;
    T newData;
    __code checkAndSet(Impl* atomicTImpl, T newData, __code next(...), __code fail(...));
    __code next(...);
    __code fail(...);
} AtomicT;

# tใฎ็ฝฎๆ›

  • Tใฎๅขƒ็•ŒใŒๆŒ‡ๅฎšใ•ใ‚Œใฆใ„ใชใ„ๅ ดๅˆ
    • ็ฝฎใๆ›ใˆใ‚‰ใ‚Œใ‚‹ใ‹ใฎ็ขบ่ช
    • ็ฝฎใๆ›ใˆใ‚‰ใ‚Œใใ†ใชใ‚‰ใ‚ณใƒผใƒ‰ใ‚’็”Ÿๆˆใ™ใ‚‹
      • ๅž‹(header)
      • CodeGear
  • Tใฎๅขƒ็•ŒใŒๆŒ‡ๅฎšใ•ใ‚Œใฆใ„ใ‚‹ๅ ดๅˆ
    • ๅž‹ใƒใ‚งใƒƒใ‚ฏ
      • data gearใฎๅŒไธ€ๆ€ง
      • primitive typeใฏwrapeperใ‚’ใ„ใ‚Œใ‚‹?
    • ็ฝฎใๆ›ใˆใ‚‰ใ‚Œใใ†ใชใ‚‰็ฝฎๆ›ใ™ใ‚‹

ใ„ใšใ‚Œใซใ›ใ‚ˆ.cbcใจ.hใ‚’็”Ÿๆˆใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใใ† - ๅ‹•็š„ใซใ‚ณใƒณใƒ‘ใ‚คใƒซใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚‹ใฎใงใ€CMakeใ‚’ใ„ใ˜ใ‚‹ๅฟ…่ฆๆ€งใŒใ‚ใ‚Šใใ†…

Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy