# 2021q1 Homework4 (refinement)
contributed by < `ccs100203` >
###### tags: `linux2021`
> [J09: refinement](https://hackmd.io/@sysprog/By7ewkAX_)
## 問題整理
- 在 qui3 中遇到的 [xs_tmp](https://hackmd.io/679L8HFhSRe_6wRCkcWtsA#%E5%85%A9%E5%80%8B%E9%87%8D%E8%A6%81%E7%9A%84-macro),其中包含的 struct 用途未搞懂
目前還是搞不懂為什麼 `_Static_assert` 需要包裝在一個 struct 裡面
```cpp
/* Memory leaks happen if the string is too long but it is still useful for
* short strings.
*/
#define xs_tmp(x) \
((void) ((struct { \
_Static_assert(sizeof(x) <= MAX_STR_LEN, "it is too big"); \
int dummy; \
}){1}), \
xs_new(&xs_literal_empty(), x))
```
- quiz4 中對於 pthread 以及 lock 的掌握度低 (已經搞懂)
- 非遞迴版本 INTROSORT 的轉換時機 (無 MAX_LEVEL)