Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactoring 제안 #29

Open
1 task
ChoiWheatley opened this issue Oct 1, 2023 · 3 comments
Open
1 task

refactoring 제안 #29

ChoiWheatley opened this issue Oct 1, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@ChoiWheatley
Copy link
Owner

ChoiWheatley commented Oct 1, 2023

  • 매번 struct 붙이는 것이 짜증나지 않으신가요? 이번 기회에 한 번에 typedef로 타입을 짧게 쓰는 건 어떨까요? 전부 다 바꾸는 건 의미가 없으므로 자주 쓰일 타입들만 그렇게 작성해봅시다.

  • struct threadThread

  • struct list_elemListElem

  • struct semaphoreSema

  • struct lockLock

@ChoiWheatley ChoiWheatley added the enhancement New feature or request label Oct 1, 2023
@ChoiWheatley ChoiWheatley changed the title refactoring(struct struct..) refactoring 제안 Oct 2, 2023
@ChoiWheatley
Copy link
Owner Author

ChoiWheatley commented Oct 2, 2023

  • 포매터 통일한 다음 언제한번 싹 돌리고 싶네요

@ChoiWheatley
Copy link
Owner Author

ChoiWheatley commented Oct 2, 2023

} else if (waiter_max->priority < cur->priority) { // 첫 빠따가 아닌 경우
// 기존의 max priority가 현재 thread의 priority보다 작은 경우 기존 d_elem 제거 후 새로 추가
list_remove(&waiter_max->d_elem);
list_insert_ordered(dlist, &cur->d_elem, origin_priority_dsc_d, NULL);

  • lock_acquire 실패할 경우 기부자 목록에 넣을 때 정렬해서 넣을 필요가 없답니다

@coding-jjun
Copy link
Collaborator

coding-jjun commented Oct 6, 2023

  • get_thread_elem -> elem_to_thread으로 refactoring하기
  • get_thread_d_elem -> d_elem_to_thread으로 refactoring하기

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants